Built motion from commit 5fcd269f5146f10cf3129722d518881dfac64576. Version 3.0.0...
[motion-next.git] / server / migrations / 3.0.0-alpha.js
index 890d11e..a499a2a 100644 (file)
@@ -1 +1 @@
-const a1020_0x5042=['removeColumn','stringify','util','Removed\x20column\x20%s\x20from\x20%s','renameColumn','then','addIndex\x20%s\x20%s\x20%s\x20[%s]','addColumn','migration','catch','final','query','finally','indexName','removeIndex','changeColumn','../config/logger','prototype','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','tail','info','addIndex','sequence','DROP\x20INDEX\x20`users_ibfk_1`\x20ON\x20users','queryInterface','inspect','Changed\x20column\x20%s\x20in\x20table\x20%s','ALTER\x20TABLE\x20users\x20DROP\x20FOREIGN\x20KEY\x20`users_ibfk_1`','removeIndex\x20%s\x20%s','enqueue','exports','dropTable'];(function(_0x273f6e,_0x5042d0){const _0x423485=function(_0x31fd3f){while(--_0x31fd3f){_0x273f6e['push'](_0x273f6e['shift']());}};_0x423485(++_0x5042d0);}(a1020_0x5042,0x197));const a1020_0x4234=function(_0x273f6e,_0x5042d0){_0x273f6e=_0x273f6e-0x0;let _0x423485=a1020_0x5042[_0x273f6e];return _0x423485;};const _0xa62aa1=a1020_0x4234;'use strict';const util=require(_0xa62aa1('0xb')),logger=require(_0xa62aa1('0x19'))(_0xa62aa1('0x11')),Sequence=function(){};Sequence[_0xa62aa1('0x1a')][_0xa62aa1('0x6')]=function(_0x31fd3f){const _0x220229=_0xa62aa1;this[_0x220229('0x1c')]=this[_0x220229('0x1c')]?this['tail'][_0x220229('0x15')](_0x31fd3f):_0x31fd3f();};const Migration=function(_0x5906a8){const _0x3ee6e5=_0xa62aa1;this['queryInterface']=_0x5906a8,this[_0x3ee6e5('0x1f')]=new Sequence();};Migration[_0xa62aa1('0x1a')][_0xa62aa1('0x18')]=function(_0x266386,_0x4f8a6b,_0x3b0a32){const _0x3ef48a=_0xa62aa1,_0x153676=this;this['sequence'][_0x3ef48a('0x6')](function(){const _0x55f8e7=_0x3ef48a;return _0x153676[_0x55f8e7('0x1')][_0x55f8e7('0x18')](_0x266386,_0x4f8a6b,_0x3b0a32)[_0x55f8e7('0xe')](function(){const _0x7f1d7f=_0x55f8e7;logger[_0x7f1d7f('0x1d')](_0x7f1d7f('0x3'),_0x4f8a6b,_0x266386);})[_0x55f8e7('0x12')](function(_0x3504f0){const _0x4fb3d1=_0x55f8e7;logger[_0x4fb3d1('0x1d')](JSON[_0x4fb3d1('0xa')](_0x3504f0));});});},Migration[_0xa62aa1('0x1a')][_0xa62aa1('0x10')]=function(_0x122a87,_0x22496f,_0x2d70c5){const _0x108fb6=_0xa62aa1,_0x4f7dd6=this;this[_0x108fb6('0x1f')][_0x108fb6('0x6')](function(){const _0x1f2809=_0x108fb6;return _0x4f7dd6[_0x1f2809('0x1')][_0x1f2809('0x10')](_0x122a87,_0x22496f,_0x2d70c5)['then'](function(){const _0x597895=_0x1f2809;logger[_0x597895('0x1d')]('Added\x20column\x20%s\x20to\x20%s',_0x22496f,_0x122a87);})['catch'](function(_0x2af07d){const _0x337b14=_0x1f2809;logger[_0x337b14('0x1d')](JSON[_0x337b14('0xa')](_0x2af07d));});});},Migration[_0xa62aa1('0x1a')][_0xa62aa1('0x8')]=function(_0x13cbe8){const _0x442ae6=_0xa62aa1,_0x52dee5=this;this['sequence'][_0x442ae6('0x6')](function(){const _0x48041d=_0x442ae6;return _0x52dee5[_0x48041d('0x1')][_0x48041d('0x8')](_0x13cbe8,{'force':!![]})[_0x48041d('0xe')](function(){logger['info']('table\x20dropped\x20%s',_0x13cbe8);})['catch'](function(_0x367afe){const _0x22174b=_0x48041d;logger['info'](JSON[_0x22174b('0xa')](_0x367afe));});});},Migration[_0xa62aa1('0x1a')][_0xa62aa1('0x1e')]=function(_0x5e553f,_0x528e0f,_0x4ad7b5){const _0x498517=_0xa62aa1,_0x255cfb=this;this[_0x498517('0x1f')]['enqueue'](function(){const _0x3178e2=_0x498517;return _0x255cfb[_0x3178e2('0x1')]['addIndex'](_0x5e553f,_0x528e0f,{'indexName':_0x4ad7b5[_0x3178e2('0x16')],'indicesType':_0x4ad7b5['indicesType']})['then'](function(){const _0x365302=_0x3178e2;logger[_0x365302('0x1d')](_0x365302('0xf'),_0x5e553f,_0x528e0f['join'](','),_0x4ad7b5[_0x365302('0x16')],_0x4ad7b5['indicesType']);})[_0x3178e2('0x12')](function(_0x25f54e){const _0x4ebadf=_0x3178e2;logger['info'](JSON[_0x4ebadf('0xa')](_0x25f54e));});});},Migration['prototype'][_0xa62aa1('0x17')]=function(_0x187d5c,_0xe97e6c){const _0x392025=_0xa62aa1,_0x40ec71=this;this[_0x392025('0x1f')]['enqueue'](function(){const _0x518ef6=_0x392025;return _0x40ec71['queryInterface'][_0x518ef6('0x17')](_0x187d5c,_0xe97e6c)[_0x518ef6('0xe')](function(){const _0x53fa8c=_0x518ef6;logger[_0x53fa8c('0x1d')](_0x53fa8c('0x5'),_0x187d5c,_0xe97e6c);})['catch'](function(_0x208db1){const _0x2e197a=_0x518ef6;logger[_0x2e197a('0x1d')](JSON[_0x2e197a('0xa')](_0x208db1));});});},Migration[_0xa62aa1('0x1a')][_0xa62aa1('0x14')]=function(_0x1ac647){const _0x58fa34=_0xa62aa1,_0x1d69c7=this;this[_0x58fa34('0x1f')][_0x58fa34('0x6')](function(){const _0x2f2a14=_0x58fa34;return _0x1d69c7[_0x2f2a14('0x1')]['sequelize'][_0x2f2a14('0x14')](_0x1ac647)[_0x2f2a14('0xe')](function(){const _0x545fe2=_0x2f2a14;logger[_0x545fe2('0x1d')]('query\x20%s',_0x1ac647);})[_0x2f2a14('0x12')](function(_0x31a8d5){const _0x404f49=_0x2f2a14;logger[_0x404f49('0x1d')](JSON[_0x404f49('0xa')](_0x31a8d5));});});},Migration[_0xa62aa1('0x1a')][_0xa62aa1('0x9')]=function(_0x34ab77,_0x4d1e12){const _0x5c92a2=_0xa62aa1,_0x593e08=this;this[_0x5c92a2('0x1f')][_0x5c92a2('0x6')](function(){const _0x48eacd=_0x5c92a2;return _0x593e08[_0x48eacd('0x1')]['removeColumn'](_0x34ab77,_0x4d1e12)[_0x48eacd('0xe')](function(){const _0x344238=_0x48eacd;logger[_0x344238('0x1d')](_0x344238('0xc'),_0x4d1e12,_0x34ab77);})[_0x48eacd('0x12')](function(_0x451388){const _0x49492b=_0x48eacd;logger[_0x49492b('0x1d')](util[_0x49492b('0x2')](_0x451388,{'showHidden':![],'depth':null}));});});},Migration[_0xa62aa1('0x1a')][_0xa62aa1('0xd')]=function(_0x413054,_0x321e14,_0x565e03){const _0x96efa3=_0xa62aa1,_0x314965=this;this[_0x96efa3('0x1f')]['enqueue'](function(){const _0xd70cf8=_0x96efa3;return _0x314965[_0xd70cf8('0x1')]['renameColumn'](_0x413054,_0x321e14,_0x565e03)['then'](function(){const _0x23841a=_0xd70cf8;logger[_0x23841a('0x1d')](_0x23841a('0x1b'),_0x321e14,_0x565e03,_0x413054);})['catch'](function(_0x1a4cb3){const _0xcf2e19=_0xd70cf8;logger[_0xcf2e19('0x1d')](util[_0xcf2e19('0x2')](_0x1a4cb3,{'showHidden':![],'depth':null}));});});},Migration[_0xa62aa1('0x1a')][_0xa62aa1('0x13')]=function(_0x2228b7){const _0x4a2402=_0xa62aa1;this[_0x4a2402('0x1f')]['enqueue'](function(){return _0x2228b7();});},module[_0xa62aa1('0x7')]={'up':function(_0x7f5c7){return new Promise(function(_0x3fb2c0){const _0x20fed2=a1020_0x4234,_0x2ab574=new Migration(_0x7f5c7);_0x2ab574[_0x20fed2('0x14')](_0x20fed2('0x4')),_0x2ab574[_0x20fed2('0x14')](_0x20fed2('0x0')),_0x2ab574[_0x20fed2('0x14')]('ALTER\x20TABLE\x20users\x20ADD\x20CONSTRAINT\x20`users_ibfk_1`\x20FOREIGN\x20KEY\x20(userProfileId)\x20REFERENCES\x20user_profiles(id)\x20ON\x20DELETE\x20RESTRICT'),_0x2ab574['final'](_0x3fb2c0);});},'down':function(){}};
\ No newline at end of file
+const a1020_0x5912=['info','removeIndex','sequelize','final','Changed\x20column\x20%s\x20in\x20table\x20%s','ALTER\x20TABLE\x20users\x20ADD\x20CONSTRAINT\x20`users_ibfk_1`\x20FOREIGN\x20KEY\x20(userProfileId)\x20REFERENCES\x20user_profiles(id)\x20ON\x20DELETE\x20RESTRICT','dropTable','query','addIndex','Added\x20column\x20%s\x20to\x20%s','Removed\x20column\x20%s\x20from\x20%s','stringify','ALTER\x20TABLE\x20users\x20DROP\x20FOREIGN\x20KEY\x20`users_ibfk_1`','migration','removeIndex\x20%s\x20%s','then','removeColumn','table\x20dropped\x20%s','exports','indicesType','inspect','changeColumn','prototype','enqueue','join','util','query\x20%s','../config/logger','renameColumn','sequence','DROP\x20INDEX\x20`users_ibfk_1`\x20ON\x20users','tail','indexName','catch','finally','queryInterface'];(function(_0x11e979,_0x591212){const _0x18f54e=function(_0x5e2447){while(--_0x5e2447){_0x11e979['push'](_0x11e979['shift']());}};_0x18f54e(++_0x591212);}(a1020_0x5912,0x188));const a1020_0x18f5=function(_0x11e979,_0x591212){_0x11e979=_0x11e979-0x0;let _0x18f54e=a1020_0x5912[_0x11e979];return _0x18f54e;};const _0x1c5e9b=a1020_0x18f5;'use strict';const util=require(_0x1c5e9b('0x1d')),logger=require(_0x1c5e9b('0x1f'))(_0x1c5e9b('0x11')),Sequence=function(){};Sequence[_0x1c5e9b('0x1a')][_0x1c5e9b('0x1b')]=function(_0x5e2447){const _0x4334dd=_0x1c5e9b;this[_0x4334dd('0x23')]=this[_0x4334dd('0x23')]?this['tail'][_0x4334dd('0x2')](_0x5e2447):_0x5e2447();};const Migration=function(_0x2bfbfc){const _0x5dfe1e=_0x1c5e9b;this[_0x5dfe1e('0x3')]=_0x2bfbfc,this[_0x5dfe1e('0x21')]=new Sequence();};Migration[_0x1c5e9b('0x1a')]['changeColumn']=function(_0x326f15,_0x2a08d9,_0x13578a){const _0x4cd351=_0x1c5e9b,_0xf51546=this;this[_0x4cd351('0x21')][_0x4cd351('0x1b')](function(){const _0x2f354c=_0x4cd351;return _0xf51546[_0x2f354c('0x3')][_0x2f354c('0x19')](_0x326f15,_0x2a08d9,_0x13578a)[_0x2f354c('0x13')](function(){const _0x1b5f7c=_0x2f354c;logger[_0x1b5f7c('0x4')](_0x1b5f7c('0x8'),_0x2a08d9,_0x326f15);})[_0x2f354c('0x1')](function(_0x242fef){const _0x9b7a8e=_0x2f354c;logger[_0x9b7a8e('0x4')](JSON[_0x9b7a8e('0xf')](_0x242fef));});});},Migration['prototype']['addColumn']=function(_0x5b30db,_0x271526,_0x195559){const _0x1e3d2a=_0x1c5e9b,_0x1fb3b3=this;this[_0x1e3d2a('0x21')][_0x1e3d2a('0x1b')](function(){const _0xe052bb=_0x1e3d2a;return _0x1fb3b3[_0xe052bb('0x3')]['addColumn'](_0x5b30db,_0x271526,_0x195559)['then'](function(){const _0x419a8e=_0xe052bb;logger['info'](_0x419a8e('0xd'),_0x271526,_0x5b30db);})[_0xe052bb('0x1')](function(_0x1e9215){const _0x48ad3f=_0xe052bb;logger[_0x48ad3f('0x4')](JSON[_0x48ad3f('0xf')](_0x1e9215));});});},Migration['prototype'][_0x1c5e9b('0xa')]=function(_0x1b2ea8){const _0x387e7b=_0x1c5e9b,_0x31c916=this;this[_0x387e7b('0x21')][_0x387e7b('0x1b')](function(){const _0x22edf2=_0x387e7b;return _0x31c916[_0x22edf2('0x3')][_0x22edf2('0xa')](_0x1b2ea8,{'force':!![]})['then'](function(){const _0x4d353c=_0x22edf2;logger[_0x4d353c('0x4')](_0x4d353c('0x15'),_0x1b2ea8);})['catch'](function(_0xb3c139){const _0x21d51f=_0x22edf2;logger[_0x21d51f('0x4')](JSON[_0x21d51f('0xf')](_0xb3c139));});});},Migration[_0x1c5e9b('0x1a')][_0x1c5e9b('0xc')]=function(_0x4da982,_0x576f2c,_0x22d33b){const _0xfa68e3=_0x1c5e9b,_0x1b0c7b=this;this[_0xfa68e3('0x21')][_0xfa68e3('0x1b')](function(){const _0x14775f=_0xfa68e3;return _0x1b0c7b[_0x14775f('0x3')][_0x14775f('0xc')](_0x4da982,_0x576f2c,{'indexName':_0x22d33b[_0x14775f('0x0')],'indicesType':_0x22d33b[_0x14775f('0x17')]})[_0x14775f('0x13')](function(){const _0x1df3fe=_0x14775f;logger[_0x1df3fe('0x4')]('addIndex\x20%s\x20%s\x20%s\x20[%s]',_0x4da982,_0x576f2c[_0x1df3fe('0x1c')](','),_0x22d33b[_0x1df3fe('0x0')],_0x22d33b[_0x1df3fe('0x17')]);})[_0x14775f('0x1')](function(_0x15194f){logger['info'](JSON['stringify'](_0x15194f));});});},Migration[_0x1c5e9b('0x1a')][_0x1c5e9b('0x5')]=function(_0x5c985e,_0x4e8452){const _0x24cdf6=_0x1c5e9b,_0x691925=this;this['sequence'][_0x24cdf6('0x1b')](function(){const _0xb90f2d=_0x24cdf6;return _0x691925[_0xb90f2d('0x3')][_0xb90f2d('0x5')](_0x5c985e,_0x4e8452)[_0xb90f2d('0x13')](function(){const _0x318bc0=_0xb90f2d;logger['info'](_0x318bc0('0x12'),_0x5c985e,_0x4e8452);})[_0xb90f2d('0x1')](function(_0x31e502){const _0x2adf73=_0xb90f2d;logger['info'](JSON[_0x2adf73('0xf')](_0x31e502));});});},Migration['prototype'][_0x1c5e9b('0xb')]=function(_0x4a48c5){const _0x4f77a2=_0x1c5e9b,_0x49fd09=this;this[_0x4f77a2('0x21')][_0x4f77a2('0x1b')](function(){const _0x50b6bd=_0x4f77a2;return _0x49fd09['queryInterface'][_0x50b6bd('0x6')]['query'](_0x4a48c5)[_0x50b6bd('0x13')](function(){const _0x18be59=_0x50b6bd;logger['info'](_0x18be59('0x1e'),_0x4a48c5);})[_0x50b6bd('0x1')](function(_0x2be26a){const _0x4031d5=_0x50b6bd;logger[_0x4031d5('0x4')](JSON[_0x4031d5('0xf')](_0x2be26a));});});},Migration[_0x1c5e9b('0x1a')][_0x1c5e9b('0x14')]=function(_0x281930,_0x224b7c){const _0xd93412=_0x1c5e9b,_0x11fbee=this;this[_0xd93412('0x21')]['enqueue'](function(){const _0x438f66=_0xd93412;return _0x11fbee['queryInterface']['removeColumn'](_0x281930,_0x224b7c)['then'](function(){const _0x197a80=a1020_0x18f5;logger[_0x197a80('0x4')](_0x197a80('0xe'),_0x224b7c,_0x281930);})[_0x438f66('0x1')](function(_0x5f1017){const _0x1cf6fe=_0x438f66;logger[_0x1cf6fe('0x4')](util['inspect'](_0x5f1017,{'showHidden':![],'depth':null}));});});},Migration[_0x1c5e9b('0x1a')][_0x1c5e9b('0x20')]=function(_0x1e744d,_0x4ef896,_0x2817fc){const _0x76b59f=_0x1c5e9b,_0x1b1d26=this;this[_0x76b59f('0x21')][_0x76b59f('0x1b')](function(){const _0x5295d1=_0x76b59f;return _0x1b1d26['queryInterface']['renameColumn'](_0x1e744d,_0x4ef896,_0x2817fc)[_0x5295d1('0x13')](function(){logger['info']('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x4ef896,_0x2817fc,_0x1e744d);})[_0x5295d1('0x1')](function(_0x15e4bb){const _0xb985a0=_0x5295d1;logger['info'](util[_0xb985a0('0x18')](_0x15e4bb,{'showHidden':![],'depth':null}));});});},Migration[_0x1c5e9b('0x1a')][_0x1c5e9b('0x7')]=function(_0x4143a9){const _0x467219=_0x1c5e9b;this[_0x467219('0x21')]['enqueue'](function(){return _0x4143a9();});},module[_0x1c5e9b('0x16')]={'up':function(_0x452fc7){return new Promise(function(_0x5d68d6){const _0x2a2e13=a1020_0x18f5,_0x81eb9f=new Migration(_0x452fc7);_0x81eb9f[_0x2a2e13('0xb')](_0x2a2e13('0x10')),_0x81eb9f[_0x2a2e13('0xb')](_0x2a2e13('0x22')),_0x81eb9f['query'](_0x2a2e13('0x9')),_0x81eb9f[_0x2a2e13('0x7')](_0x5d68d6);});},'down':function(){}};
\ No newline at end of file