2fe343d6e85c6e8a6648f4f317688fd9980e27b8
[motion-next.git] / server / migrations / 2.4.9.js
1 const a1012_0x5641=['inspect','dropTable','indicesType','renameColumn','stringify','indexName','Added\x20column\x20%s\x20to\x20%s','enqueue','addIndex','../config/logger','query\x20%s','join','exports','prototype','sequence','info','addIndex\x20%s\x20%s\x20%s\x20[%s]','catch','table\x20dropped\x20%s','final','addColumn','tail','sequelize','util','query','then','finally','removeIndex','removeColumn','migration','queryInterface'];(function(_0x442f09,_0x5641da){const _0x469711=function(_0x635368){while(--_0x635368){_0x442f09['push'](_0x442f09['shift']());}};_0x469711(++_0x5641da);}(a1012_0x5641,0x16c));const a1012_0x4697=function(_0x442f09,_0x5641da){_0x442f09=_0x442f09-0x0;let _0x469711=a1012_0x5641[_0x442f09];return _0x469711;};const _0x3b1da8=a1012_0x4697;'use strict';const util=require(_0x3b1da8('0x0')),logger=require(_0x3b1da8('0x11'))(_0x3b1da8('0x6')),Sequence=function(){};Sequence['prototype'][_0x3b1da8('0xf')]=function(_0x635368){const _0x50091b=_0x3b1da8;this[_0x50091b('0x1d')]=this[_0x50091b('0x1d')]?this[_0x50091b('0x1d')][_0x50091b('0x3')](_0x635368):_0x635368();};const Migration=function(_0xb0775c){const _0x472e69=_0x3b1da8;this[_0x472e69('0x7')]=_0xb0775c,this[_0x472e69('0x16')]=new Sequence();};Migration[_0x3b1da8('0x15')]['changeColumn']=function(_0x4fc494,_0xa16fcc,_0x4a0303){const _0x5c716c=_0x3b1da8,_0x5309d3=this;this[_0x5c716c('0x16')][_0x5c716c('0xf')](function(){const _0x5af6db=_0x5c716c;return _0x5309d3[_0x5af6db('0x7')]['changeColumn'](_0x4fc494,_0xa16fcc,_0x4a0303)['then'](function(){logger['info']('Changed\x20column\x20%s\x20in\x20table\x20%s',_0xa16fcc,_0x4fc494);})[_0x5af6db('0x19')](function(_0x38a71b){const _0x18b5af=_0x5af6db;logger[_0x18b5af('0x17')](JSON[_0x18b5af('0xc')](_0x38a71b));});});},Migration['prototype']['addColumn']=function(_0xd885d2,_0x7bd35f,_0x473b1b){const _0x4451fb=_0x3b1da8,_0x24a20b=this;this['sequence'][_0x4451fb('0xf')](function(){const _0x4af9c1=_0x4451fb;return _0x24a20b[_0x4af9c1('0x7')][_0x4af9c1('0x1c')](_0xd885d2,_0x7bd35f,_0x473b1b)['then'](function(){const _0x4581f6=_0x4af9c1;logger[_0x4581f6('0x17')](_0x4581f6('0xe'),_0x7bd35f,_0xd885d2);})['catch'](function(_0x535f6b){const _0x3d1ea9=_0x4af9c1;logger[_0x3d1ea9('0x17')](JSON[_0x3d1ea9('0xc')](_0x535f6b));});});},Migration[_0x3b1da8('0x15')][_0x3b1da8('0x9')]=function(_0x52a754){const _0x155d07=_0x3b1da8,_0x13d4c4=this;this['sequence'][_0x155d07('0xf')](function(){const _0x5d4c0e=_0x155d07;return _0x13d4c4[_0x5d4c0e('0x7')]['dropTable'](_0x52a754,{'force':!![]})['then'](function(){const _0x1b2d69=_0x5d4c0e;logger[_0x1b2d69('0x17')](_0x1b2d69('0x1a'),_0x52a754);})['catch'](function(_0x323199){const _0x45f4f8=_0x5d4c0e;logger['info'](JSON[_0x45f4f8('0xc')](_0x323199));});});},Migration[_0x3b1da8('0x15')][_0x3b1da8('0x10')]=function(_0x44244a,_0x1694c0,_0x454b8f){const _0x3f2a42=_0x3b1da8,_0x1fb1c2=this;this['sequence'][_0x3f2a42('0xf')](function(){const _0x4522e2=_0x3f2a42;return _0x1fb1c2[_0x4522e2('0x7')][_0x4522e2('0x10')](_0x44244a,_0x1694c0,{'indexName':_0x454b8f[_0x4522e2('0xd')],'indicesType':_0x454b8f[_0x4522e2('0xa')]})['then'](function(){const _0x4ae58f=_0x4522e2;logger['info'](_0x4ae58f('0x18'),_0x44244a,_0x1694c0[_0x4ae58f('0x13')](','),_0x454b8f[_0x4ae58f('0xd')],_0x454b8f[_0x4ae58f('0xa')]);})[_0x4522e2('0x19')](function(_0x1c15a3){const _0x1b4e67=_0x4522e2;logger['info'](JSON[_0x1b4e67('0xc')](_0x1c15a3));});});},Migration[_0x3b1da8('0x15')][_0x3b1da8('0x4')]=function(_0xaae6d6,_0x4bc9ff){const _0x378217=_0x3b1da8,_0x222135=this;this[_0x378217('0x16')]['enqueue'](function(){const _0x1f5f60=_0x378217;return _0x222135[_0x1f5f60('0x7')][_0x1f5f60('0x4')](_0xaae6d6,_0x4bc9ff)['then'](function(){const _0x55ab8a=_0x1f5f60;logger[_0x55ab8a('0x17')]('removeIndex\x20%s\x20%s',_0xaae6d6,_0x4bc9ff);})['catch'](function(_0x8c56){const _0x16805b=_0x1f5f60;logger[_0x16805b('0x17')](JSON[_0x16805b('0xc')](_0x8c56));});});},Migration['prototype'][_0x3b1da8('0x1')]=function(_0x99a596){const _0x4156b9=_0x3b1da8,_0x4e58d3=this;this[_0x4156b9('0x16')][_0x4156b9('0xf')](function(){const _0x3165f4=_0x4156b9;return _0x4e58d3[_0x3165f4('0x7')][_0x3165f4('0x1e')]['query'](_0x99a596)[_0x3165f4('0x2')](function(){const _0x396fd5=_0x3165f4;logger['info'](_0x396fd5('0x12'),_0x99a596);})[_0x3165f4('0x19')](function(_0x2ad39b){const _0xebc6b=_0x3165f4;logger[_0xebc6b('0x17')](JSON['stringify'](_0x2ad39b));});});},Migration['prototype'][_0x3b1da8('0x5')]=function(_0x5edfbb,_0x2eb625){const _0x4a3ec3=_0x3b1da8,_0x20e07f=this;this[_0x4a3ec3('0x16')][_0x4a3ec3('0xf')](function(){const _0x5d86a2=_0x4a3ec3;return _0x20e07f[_0x5d86a2('0x7')][_0x5d86a2('0x5')](_0x5edfbb,_0x2eb625)['then'](function(){const _0x6dc115=_0x5d86a2;logger[_0x6dc115('0x17')]('Removed\x20column\x20%s\x20from\x20%s',_0x2eb625,_0x5edfbb);})[_0x5d86a2('0x19')](function(_0xa86622){const _0x11762b=_0x5d86a2;logger['info'](util[_0x11762b('0x8')](_0xa86622,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x3b1da8('0xb')]=function(_0x3bc243,_0x5057af,_0x301045){const _0x4f4098=_0x3b1da8,_0x2c5d60=this;this[_0x4f4098('0x16')]['enqueue'](function(){const _0x333a0d=_0x4f4098;return _0x2c5d60[_0x333a0d('0x7')][_0x333a0d('0xb')](_0x3bc243,_0x5057af,_0x301045)[_0x333a0d('0x2')](function(){logger['info']('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x5057af,_0x301045,_0x3bc243);})['catch'](function(_0xe03c96){const _0xaed847=_0x333a0d;logger[_0xaed847('0x17')](util[_0xaed847('0x8')](_0xe03c96,{'showHidden':![],'depth':null}));});});},Migration[_0x3b1da8('0x15')]['final']=function(_0x3809a6){const _0x535eab=_0x3b1da8;this[_0x535eab('0x16')][_0x535eab('0xf')](function(){return _0x3809a6();});},module[_0x3b1da8('0x14')]={'up':function(_0x349f48){return new Promise(function(_0x6522b7){const _0x3b1df6=a1012_0x4697,_0x27f5cd=new Migration(_0x349f48);_0x27f5cd[_0x3b1df6('0x1b')](_0x6522b7);});},'down':function(){}};