Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.77.js
1 const a956_0x3c6e=['renameColumn','then','sequence','query\x20%s','addColumn','removeIndex','migration','removeIndex\x20%s\x20%s','users','removeColumn','addIndex','STRING','finally','prototype','final','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','tail','queryInterface','join','Changed\x20column\x20%s\x20in\x20table\x20%s','exports','enqueue','bot','stringify','catch','interface','util','query','../config/logger','sequelize','Added\x20column\x20%s\x20to\x20%s','table\x20dropped\x20%s','dropTable','BOOLEAN','info','inspect','report_square','Removed\x20column\x20%s\x20from\x20%s'];(function(_0x2df395,_0x3c6e42){const _0x324b72=function(_0x2eefcb){while(--_0x2eefcb){_0x2df395['push'](_0x2df395['shift']());}};_0x324b72(++_0x3c6e42);}(a956_0x3c6e,0x133));const a956_0x324b=function(_0x2df395,_0x3c6e42){_0x2df395=_0x2df395-0x0;let _0x324b72=a956_0x3c6e[_0x2df395];return _0x324b72;};const _0x36b854=a956_0x324b;'use strict';const util=require(_0x36b854('0x17')),logger=require(_0x36b854('0x19'))(_0x36b854('0x3')),Sequence=function(){};Sequence[_0x36b854('0xa')][_0x36b854('0x12')]=function(_0x2eefcb){const _0x5a8c7b=_0x36b854;this[_0x5a8c7b('0xd')]=this[_0x5a8c7b('0xd')]?this[_0x5a8c7b('0xd')][_0x5a8c7b('0x9')](_0x2eefcb):_0x2eefcb();};const Migration=function(_0x3a2544){const _0x5c76c8=_0x36b854;this[_0x5c76c8('0xe')]=_0x3a2544,this[_0x5c76c8('0x25')]=new Sequence();};Migration[_0x36b854('0xa')]['changeColumn']=function(_0x385406,_0x7fdf98,_0x3ed3e7){const _0x42ab7f=_0x36b854,_0x19d57d=this;this[_0x42ab7f('0x25')][_0x42ab7f('0x12')](function(){const _0x25a9b5=_0x42ab7f;return _0x19d57d[_0x25a9b5('0xe')]['changeColumn'](_0x385406,_0x7fdf98,_0x3ed3e7)['then'](function(){const _0x7aa010=_0x25a9b5;logger[_0x7aa010('0x1f')](_0x7aa010('0x10'),_0x7fdf98,_0x385406);})[_0x25a9b5('0x15')](function(_0x11e790){const _0x3b0068=_0x25a9b5;logger[_0x3b0068('0x1f')](JSON[_0x3b0068('0x14')](_0x11e790));});});},Migration[_0x36b854('0xa')][_0x36b854('0x1')]=function(_0x4a1a20,_0x384024,_0x18d6b4){const _0x114617=_0x36b854,_0x311af0=this;this[_0x114617('0x25')][_0x114617('0x12')](function(){const _0x12dcb0=_0x114617;return _0x311af0[_0x12dcb0('0xe')]['addColumn'](_0x4a1a20,_0x384024,_0x18d6b4)[_0x12dcb0('0x24')](function(){const _0x2bc5af=_0x12dcb0;logger['info'](_0x2bc5af('0x1b'),_0x384024,_0x4a1a20);})[_0x12dcb0('0x15')](function(_0x38dca7){logger['info'](JSON['stringify'](_0x38dca7));});});},Migration[_0x36b854('0xa')][_0x36b854('0x1d')]=function(_0x3e5c5c){const _0x3de619=_0x36b854,_0x12af7f=this;this[_0x3de619('0x25')][_0x3de619('0x12')](function(){const _0x1a0903=_0x3de619;return _0x12af7f[_0x1a0903('0xe')]['dropTable'](_0x3e5c5c,{'force':!![]})[_0x1a0903('0x24')](function(){const _0xf38d6f=_0x1a0903;logger[_0xf38d6f('0x1f')](_0xf38d6f('0x1c'),_0x3e5c5c);})[_0x1a0903('0x15')](function(_0x148d22){const _0x269220=_0x1a0903;logger[_0x269220('0x1f')](JSON[_0x269220('0x14')](_0x148d22));});});},Migration[_0x36b854('0xa')][_0x36b854('0x7')]=function(_0x10942a,_0x35888e,_0x380742){const _0x59c2e2=_0x36b854,_0x36d557=this;this[_0x59c2e2('0x25')][_0x59c2e2('0x12')](function(){const _0x37c446=_0x59c2e2;return _0x36d557[_0x37c446('0xe')]['addIndex'](_0x10942a,_0x35888e,{'indexName':_0x380742})[_0x37c446('0x24')](function(){const _0x55337f=_0x37c446;logger[_0x55337f('0x1f')]('addIndex\x20%s\x20%s\x20%s',_0x10942a,_0x35888e[_0x55337f('0xf')](','),_0x380742);})[_0x37c446('0x15')](function(_0x105556){const _0x1196d4=_0x37c446;logger[_0x1196d4('0x1f')](JSON['stringify'](_0x105556));});});},Migration[_0x36b854('0xa')][_0x36b854('0x2')]=function(_0xddc196,_0x172179){const _0x186a92=_0x36b854,_0x3f4f10=this;this[_0x186a92('0x25')][_0x186a92('0x12')](function(){const _0x45ed28=_0x186a92;return _0x3f4f10[_0x45ed28('0xe')][_0x45ed28('0x2')](_0xddc196,_0x172179)[_0x45ed28('0x24')](function(){const _0x4f5bf7=_0x45ed28;logger[_0x4f5bf7('0x1f')](_0x4f5bf7('0x4'),_0xddc196,_0x172179);})[_0x45ed28('0x15')](function(_0x1f541f){const _0x3cccc0=_0x45ed28;logger[_0x3cccc0('0x1f')](JSON[_0x3cccc0('0x14')](_0x1f541f));});});},Migration[_0x36b854('0xa')][_0x36b854('0x18')]=function(_0xc4cca3){const _0x302a01=_0x36b854,_0x2bfc14=this;this['sequence'][_0x302a01('0x12')](function(){const _0x455932=_0x302a01;return _0x2bfc14[_0x455932('0xe')][_0x455932('0x1a')]['query'](_0xc4cca3)[_0x455932('0x24')](function(){const _0x426f11=_0x455932;logger[_0x426f11('0x1f')](_0x426f11('0x0'),_0xc4cca3);})['catch'](function(_0x160eb0){const _0x3339=_0x455932;logger[_0x3339('0x1f')](JSON['stringify'](_0x160eb0));});});},Migration['prototype'][_0x36b854('0x6')]=function(_0x130706,_0x415e02){const _0x473ab8=_0x36b854,_0x34cff9=this;this[_0x473ab8('0x25')][_0x473ab8('0x12')](function(){const _0x3011cc=_0x473ab8;return _0x34cff9[_0x3011cc('0xe')][_0x3011cc('0x6')](_0x130706,_0x415e02)[_0x3011cc('0x24')](function(){const _0x10e402=_0x3011cc;logger['info'](_0x10e402('0x22'),_0x415e02,_0x130706);})[_0x3011cc('0x15')](function(_0x344501){const _0x1771b7=_0x3011cc;logger[_0x1771b7('0x1f')](util['inspect'](_0x344501,{'showHidden':![],'depth':null}));});});},Migration[_0x36b854('0xa')][_0x36b854('0x23')]=function(_0x30d9e4,_0x4d29c3,_0x4e9c42){const _0x4c3708=_0x36b854,_0x580a0e=this;this[_0x4c3708('0x25')]['enqueue'](function(){const _0x44549e=_0x4c3708;return _0x580a0e[_0x44549e('0xe')]['renameColumn'](_0x30d9e4,_0x4d29c3,_0x4e9c42)['then'](function(){const _0x14a0a9=_0x44549e;logger[_0x14a0a9('0x1f')](_0x14a0a9('0xc'),_0x4d29c3,_0x4e9c42,_0x30d9e4);})[_0x44549e('0x15')](function(_0x1136ed){const _0xa8d988=_0x44549e;logger[_0xa8d988('0x1f')](util[_0xa8d988('0x20')](_0x1136ed,{'showHidden':![],'depth':null}));});});},Migration[_0x36b854('0xa')][_0x36b854('0xb')]=function(_0x3d0f1d){const _0x1fdaa1=_0x36b854;this[_0x1fdaa1('0x25')]['enqueue'](function(){return _0x3d0f1d();});},module[_0x36b854('0x11')]={'up':function(_0x249c13,_0x558017){return new Promise(function(_0x6bafdf){const _0x253b87=a956_0x324b,_0x1d8500=new Migration(_0x249c13);_0x1d8500['addColumn'](_0x253b87('0x21'),_0x253b87('0x13'),{'type':_0x558017[_0x253b87('0x1e')],'defaultValue':![]}),_0x1d8500[_0x253b87('0x1')]('users',_0x253b87('0x16'),{'type':_0x558017[_0x253b87('0x8')],'defaultValue':null}),_0x1d8500[_0x253b87('0x1')](_0x253b87('0x5'),'privacyEnabled',{'type':_0x558017[_0x253b87('0x1e')],'defaultValue':![]}),_0x1d8500[_0x253b87('0xb')](_0x6bafdf);});},'down':function(){}};