4c1abed62449640221607d4fe5235df2f1818356
[motion-next.git] / server / migrations / 2.2.1.js
1 const a966_0x5220=['inspect','enqueue','sequence','renameColumn','util','query\x20%s','stringify','Removed\x20column\x20%s\x20from\x20%s','removeIndex','../config/logger','addColumn','final','addIndex\x20%s\x20%s\x20%s','query','table\x20dropped\x20%s','migration','catch','queryInterface','addIndex','Added\x20column\x20%s\x20to\x20%s','prototype','exports','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','sequelize','then','info','finally','removeColumn','Changed\x20column\x20%s\x20in\x20table\x20%s','dropTable'];(function(_0x271e20,_0x52209e){const _0x52aecc=function(_0x49576f){while(--_0x49576f){_0x271e20['push'](_0x271e20['shift']());}};_0x52aecc(++_0x52209e);}(a966_0x5220,0x101));const a966_0x52ae=function(_0x271e20,_0x52209e){_0x271e20=_0x271e20-0x0;let _0x52aecc=a966_0x5220[_0x271e20];return _0x52aecc;};const _0x303e1b=a966_0x52ae;'use strict';const util=require(_0x303e1b('0x11')),logger=require(_0x303e1b('0x16'))(_0x303e1b('0x1c')),Sequence=function(){};Sequence[_0x303e1b('0x3')][_0x303e1b('0xe')]=function(_0x49576f){const _0x3b74e7=_0x303e1b;this['tail']=this['tail']?this['tail'][_0x3b74e7('0x9')](_0x49576f):_0x49576f();};const Migration=function(_0x58ec38){const _0x1c04f6=_0x303e1b;this[_0x1c04f6('0x0')]=_0x58ec38,this['sequence']=new Sequence();};Migration[_0x303e1b('0x3')]['changeColumn']=function(_0x29ba32,_0x170565,_0x5b96f1){const _0x511e4e=_0x303e1b,_0x5a6ae6=this;this[_0x511e4e('0xf')]['enqueue'](function(){const _0x5206b5=_0x511e4e;return _0x5a6ae6[_0x5206b5('0x0')]['changeColumn'](_0x29ba32,_0x170565,_0x5b96f1)[_0x5206b5('0x7')](function(){const _0x4a46cd=_0x5206b5;logger[_0x4a46cd('0x8')](_0x4a46cd('0xb'),_0x170565,_0x29ba32);})[_0x5206b5('0x1d')](function(_0x1a8fc8){logger['info'](JSON['stringify'](_0x1a8fc8));});});},Migration['prototype'][_0x303e1b('0x17')]=function(_0x50f546,_0x546e73,_0x348e1a){const _0x385355=_0x303e1b,_0xd16df6=this;this[_0x385355('0xf')]['enqueue'](function(){const _0x6af5b4=_0x385355;return _0xd16df6[_0x6af5b4('0x0')][_0x6af5b4('0x17')](_0x50f546,_0x546e73,_0x348e1a)[_0x6af5b4('0x7')](function(){const _0x2ffc9d=_0x6af5b4;logger[_0x2ffc9d('0x8')](_0x2ffc9d('0x2'),_0x546e73,_0x50f546);})[_0x6af5b4('0x1d')](function(_0x5161b5){const _0x326fc6=_0x6af5b4;logger['info'](JSON[_0x326fc6('0x13')](_0x5161b5));});});},Migration['prototype']['dropTable']=function(_0x2ecbf0){const _0x381ac6=_0x303e1b,_0x4d8007=this;this[_0x381ac6('0xf')][_0x381ac6('0xe')](function(){const _0x4d2278=_0x381ac6;return _0x4d8007[_0x4d2278('0x0')][_0x4d2278('0xc')](_0x2ecbf0,{'force':!![]})[_0x4d2278('0x7')](function(){const _0x30d412=_0x4d2278;logger[_0x30d412('0x8')](_0x30d412('0x1b'),_0x2ecbf0);})[_0x4d2278('0x1d')](function(_0x363e5f){const _0x5c933e=_0x4d2278;logger[_0x5c933e('0x8')](JSON['stringify'](_0x363e5f));});});},Migration[_0x303e1b('0x3')][_0x303e1b('0x1')]=function(_0x2d09b8,_0x5a6a00,_0x474c94){const _0x4d6c1d=_0x303e1b,_0x21cabd=this;this['sequence'][_0x4d6c1d('0xe')](function(){const _0x553c0f=_0x4d6c1d;return _0x21cabd['queryInterface'][_0x553c0f('0x1')](_0x2d09b8,_0x5a6a00,{'indexName':_0x474c94})[_0x553c0f('0x7')](function(){const _0x41a092=_0x553c0f;logger[_0x41a092('0x8')](_0x41a092('0x19'),_0x2d09b8,_0x5a6a00['join'](','),_0x474c94);})[_0x553c0f('0x1d')](function(_0x3aec40){const _0x52c119=_0x553c0f;logger[_0x52c119('0x8')](JSON[_0x52c119('0x13')](_0x3aec40));});});},Migration[_0x303e1b('0x3')][_0x303e1b('0x15')]=function(_0x3d55c4,_0x357e07){const _0x1b510e=_0x303e1b,_0x305d42=this;this[_0x1b510e('0xf')][_0x1b510e('0xe')](function(){const _0xb1fb1a=_0x1b510e;return _0x305d42['queryInterface'][_0xb1fb1a('0x15')](_0x3d55c4,_0x357e07)['then'](function(){const _0x244fe1=_0xb1fb1a;logger[_0x244fe1('0x8')]('removeIndex\x20%s\x20%s',_0x3d55c4,_0x357e07);})[_0xb1fb1a('0x1d')](function(_0x4a19b3){const _0x2afac6=_0xb1fb1a;logger[_0x2afac6('0x8')](JSON[_0x2afac6('0x13')](_0x4a19b3));});});},Migration[_0x303e1b('0x3')][_0x303e1b('0x1a')]=function(_0x56be72){const _0x4ae72e=_0x303e1b,_0x3825b6=this;this[_0x4ae72e('0xf')]['enqueue'](function(){const _0x5ca481=_0x4ae72e;return _0x3825b6[_0x5ca481('0x0')][_0x5ca481('0x6')][_0x5ca481('0x1a')](_0x56be72)[_0x5ca481('0x7')](function(){const _0x443388=_0x5ca481;logger['info'](_0x443388('0x12'),_0x56be72);})[_0x5ca481('0x1d')](function(_0x55aac6){const _0x304afa=_0x5ca481;logger[_0x304afa('0x8')](JSON[_0x304afa('0x13')](_0x55aac6));});});},Migration[_0x303e1b('0x3')][_0x303e1b('0xa')]=function(_0x235b6d,_0xfae3e9){const _0x361930=_0x303e1b,_0x5a2e36=this;this[_0x361930('0xf')][_0x361930('0xe')](function(){const _0x185942=_0x361930;return _0x5a2e36['queryInterface'][_0x185942('0xa')](_0x235b6d,_0xfae3e9)[_0x185942('0x7')](function(){const _0x133a6d=_0x185942;logger[_0x133a6d('0x8')](_0x133a6d('0x14'),_0xfae3e9,_0x235b6d);})[_0x185942('0x1d')](function(_0x3e8980){const _0x14fd02=_0x185942;logger[_0x14fd02('0x8')](util[_0x14fd02('0xd')](_0x3e8980,{'showHidden':![],'depth':null}));});});},Migration[_0x303e1b('0x3')]['renameColumn']=function(_0x2d38c3,_0x359af6,_0x3e4ae2){const _0x52ab55=_0x303e1b,_0x49882b=this;this[_0x52ab55('0xf')]['enqueue'](function(){const _0x4468fb=_0x52ab55;return _0x49882b[_0x4468fb('0x0')][_0x4468fb('0x10')](_0x2d38c3,_0x359af6,_0x3e4ae2)[_0x4468fb('0x7')](function(){const _0x461024=_0x4468fb;logger[_0x461024('0x8')](_0x461024('0x5'),_0x359af6,_0x3e4ae2,_0x2d38c3);})[_0x4468fb('0x1d')](function(_0x4aa4a7){logger['info'](util['inspect'](_0x4aa4a7,{'showHidden':![],'depth':null}));});});},Migration[_0x303e1b('0x3')][_0x303e1b('0x18')]=function(_0x10ec92){this['sequence']['enqueue'](function(){return _0x10ec92();});},module[_0x303e1b('0x4')]={'up':function(_0x3a960b){return new Promise(function(_0x5b1aec){const _0x47c44f=a966_0x52ae,_0xf4d9df=new Migration(_0x3a960b);_0xf4d9df[_0x47c44f('0x18')](_0x5b1aec);});},'down':function(){}};