Built motion from commit 459747fdfe53bbf13fbede61eeaffea1f1438f86. Version 3.0.0...
[motion-next.git] / server / migrations / 2.4.6.js
1 const a1009_0x69f5=['finally','changeColumn','Removed\x20column\x20%s\x20from\x20%s','migration','info','sequence','addIndex','final','then','dropTable','addIndex\x20%s\x20%s\x20%s\x20[%s]','../config/logger','query','enqueue','util','sequelize','removeColumn','inspect','addColumn','renameColumn','removeIndex','stringify','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','removeIndex\x20%s\x20%s','queryInterface','table\x20dropped\x20%s','prototype','indexName','catch','Added\x20column\x20%s\x20to\x20%s','indicesType'];(function(_0x594276,_0x69f590){const _0x2f5aa4=function(_0xfd8b3f){while(--_0xfd8b3f){_0x594276['push'](_0x594276['shift']());}};_0x2f5aa4(++_0x69f590);}(a1009_0x69f5,0x135));const a1009_0x2f5a=function(_0x594276,_0x69f590){_0x594276=_0x594276-0x0;let _0x2f5aa4=a1009_0x69f5[_0x594276];return _0x2f5aa4;};const _0x308042=a1009_0x2f5a;'use strict';const util=require(_0x308042('0xf')),logger=require(_0x308042('0xc'))(_0x308042('0x4')),Sequence=function(){};Sequence[_0x308042('0x1b')][_0x308042('0xe')]=function(_0xfd8b3f){const _0x43dd1d=_0x308042;this['tail']=this['tail']?this['tail'][_0x43dd1d('0x1')](_0xfd8b3f):_0xfd8b3f();};const Migration=function(_0xbb215e){const _0x2deecb=_0x308042;this[_0x2deecb('0x19')]=_0xbb215e,this[_0x2deecb('0x6')]=new Sequence();};Migration[_0x308042('0x1b')][_0x308042('0x2')]=function(_0x34a2c8,_0xfa8df,_0x5731f2){const _0x428134=_0x308042,_0xc0b73f=this;this[_0x428134('0x6')][_0x428134('0xe')](function(){const _0x44bb8d=_0x428134;return _0xc0b73f[_0x44bb8d('0x19')][_0x44bb8d('0x2')](_0x34a2c8,_0xfa8df,_0x5731f2)['then'](function(){const _0x222a08=_0x44bb8d;logger[_0x222a08('0x5')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0xfa8df,_0x34a2c8);})['catch'](function(_0x552272){const _0x17e36c=_0x44bb8d;logger[_0x17e36c('0x5')](JSON[_0x17e36c('0x16')](_0x552272));});});},Migration[_0x308042('0x1b')][_0x308042('0x13')]=function(_0x985016,_0x30a73c,_0x2e0fd7){const _0x3fc95e=_0x308042,_0x19dd3a=this;this[_0x3fc95e('0x6')][_0x3fc95e('0xe')](function(){const _0x4e7c0c=_0x3fc95e;return _0x19dd3a[_0x4e7c0c('0x19')][_0x4e7c0c('0x13')](_0x985016,_0x30a73c,_0x2e0fd7)['then'](function(){const _0x5af2be=_0x4e7c0c;logger[_0x5af2be('0x5')](_0x5af2be('0x1e'),_0x30a73c,_0x985016);})[_0x4e7c0c('0x1d')](function(_0x7725fa){const _0x53d423=_0x4e7c0c;logger[_0x53d423('0x5')](JSON['stringify'](_0x7725fa));});});},Migration[_0x308042('0x1b')][_0x308042('0xa')]=function(_0x45c9a5){const _0x3f6c12=_0x308042,_0x120d62=this;this['sequence'][_0x3f6c12('0xe')](function(){const _0x386bf4=_0x3f6c12;return _0x120d62['queryInterface'][_0x386bf4('0xa')](_0x45c9a5,{'force':!![]})[_0x386bf4('0x9')](function(){const _0xba0420=_0x386bf4;logger[_0xba0420('0x5')](_0xba0420('0x1a'),_0x45c9a5);})['catch'](function(_0x471da8){const _0x1435f1=_0x386bf4;logger[_0x1435f1('0x5')](JSON['stringify'](_0x471da8));});});},Migration[_0x308042('0x1b')][_0x308042('0x7')]=function(_0x27de1e,_0x81489,_0x52ad90){const _0x47f2e9=_0x308042,_0xb9ef6b=this;this[_0x47f2e9('0x6')]['enqueue'](function(){const _0x45e755=_0x47f2e9;return _0xb9ef6b['queryInterface'][_0x45e755('0x7')](_0x27de1e,_0x81489,{'indexName':_0x52ad90[_0x45e755('0x1c')],'indicesType':_0x52ad90[_0x45e755('0x0')]})[_0x45e755('0x9')](function(){const _0x2fe2bd=_0x45e755;logger[_0x2fe2bd('0x5')](_0x2fe2bd('0xb'),_0x27de1e,_0x81489['join'](','),_0x52ad90[_0x2fe2bd('0x1c')],_0x52ad90[_0x2fe2bd('0x0')]);})[_0x45e755('0x1d')](function(_0x17ccec){const _0x129b77=_0x45e755;logger[_0x129b77('0x5')](JSON[_0x129b77('0x16')](_0x17ccec));});});},Migration[_0x308042('0x1b')][_0x308042('0x15')]=function(_0x4742b5,_0x416b56){const _0x3ed609=_0x308042,_0x551827=this;this[_0x3ed609('0x6')][_0x3ed609('0xe')](function(){const _0x21a0c3=_0x3ed609;return _0x551827[_0x21a0c3('0x19')]['removeIndex'](_0x4742b5,_0x416b56)['then'](function(){const _0x18167b=_0x21a0c3;logger[_0x18167b('0x5')](_0x18167b('0x18'),_0x4742b5,_0x416b56);})[_0x21a0c3('0x1d')](function(_0x282ff9){const _0x148cf1=_0x21a0c3;logger[_0x148cf1('0x5')](JSON['stringify'](_0x282ff9));});});},Migration[_0x308042('0x1b')][_0x308042('0xd')]=function(_0x391a00){const _0x313b60=_0x308042,_0x22ecf9=this;this[_0x313b60('0x6')][_0x313b60('0xe')](function(){const _0x895f3f=_0x313b60;return _0x22ecf9[_0x895f3f('0x19')][_0x895f3f('0x10')][_0x895f3f('0xd')](_0x391a00)[_0x895f3f('0x9')](function(){logger['info']('query\x20%s',_0x391a00);})['catch'](function(_0x234396){const _0x4164af=_0x895f3f;logger[_0x4164af('0x5')](JSON[_0x4164af('0x16')](_0x234396));});});},Migration['prototype'][_0x308042('0x11')]=function(_0x2a6cb3,_0x19ecd4){const _0x4ba013=_0x308042,_0x484175=this;this[_0x4ba013('0x6')][_0x4ba013('0xe')](function(){const _0x697f30=_0x4ba013;return _0x484175[_0x697f30('0x19')]['removeColumn'](_0x2a6cb3,_0x19ecd4)['then'](function(){const _0x411a8b=_0x697f30;logger[_0x411a8b('0x5')](_0x411a8b('0x3'),_0x19ecd4,_0x2a6cb3);})['catch'](function(_0x283017){const _0x58681d=_0x697f30;logger[_0x58681d('0x5')](util['inspect'](_0x283017,{'showHidden':![],'depth':null}));});});},Migration[_0x308042('0x1b')][_0x308042('0x14')]=function(_0xb7d1b9,_0x4e9587,_0x4d3b1e){const _0x2669a8=_0x308042,_0x279445=this;this[_0x2669a8('0x6')]['enqueue'](function(){const _0x995643=_0x2669a8;return _0x279445[_0x995643('0x19')][_0x995643('0x14')](_0xb7d1b9,_0x4e9587,_0x4d3b1e)[_0x995643('0x9')](function(){const _0x692a1f=_0x995643;logger[_0x692a1f('0x5')](_0x692a1f('0x17'),_0x4e9587,_0x4d3b1e,_0xb7d1b9);})['catch'](function(_0x22fab0){const _0x37f335=_0x995643;logger[_0x37f335('0x5')](util[_0x37f335('0x12')](_0x22fab0,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x308042('0x8')]=function(_0x234606){const _0x4ffc2d=_0x308042;this[_0x4ffc2d('0x6')][_0x4ffc2d('0xe')](function(){return _0x234606();});},module['exports']={'up':function(_0x511d6b){return new Promise(function(_0x174355){const _0x38a1cf=new Migration(_0x511d6b);_0x38a1cf['final'](_0x174355);});},'down':function(){}};