96ead1b0fcb42fe661701663afd3a995ce5d09d6
[motion-next.git] / server / migrations / 2.4.6.js
1 const a1009_0x1eea=['indicesType','stringify','prototype','query','exports','finally','Removed\x20column\x20%s\x20from\x20%s','then','final','queryInterface','sequence','renameColumn','addIndex\x20%s\x20%s\x20%s\x20[%s]','indexName','addIndex','Added\x20column\x20%s\x20to\x20%s','join','inspect','dropTable','tail','util','info','sequelize','enqueue','removeColumn','addColumn','query\x20%s','catch'];(function(_0x57dad9,_0x1eea15){const _0x21cff3=function(_0x563bde){while(--_0x563bde){_0x57dad9['push'](_0x57dad9['shift']());}};_0x21cff3(++_0x1eea15);}(a1009_0x1eea,0xb4));const a1009_0x21cf=function(_0x57dad9,_0x1eea15){_0x57dad9=_0x57dad9-0x0;let _0x21cff3=a1009_0x1eea[_0x57dad9];return _0x21cff3;};const _0x1d566e=a1009_0x21cf;'use strict';const util=require(_0x1d566e('0x8')),logger=require('../config/logger')('migration'),Sequence=function(){};Sequence[_0x1d566e('0x12')][_0x1d566e('0xb')]=function(_0x563bde){const _0x2a4c03=_0x1d566e;this[_0x2a4c03('0x7')]=this[_0x2a4c03('0x7')]?this[_0x2a4c03('0x7')][_0x2a4c03('0x15')](_0x563bde):_0x563bde();};const Migration=function(_0x101d27){const _0x5a32bb=_0x1d566e;this['queryInterface']=_0x101d27,this[_0x5a32bb('0x1a')]=new Sequence();};Migration[_0x1d566e('0x12')]['changeColumn']=function(_0xf06ddc,_0x599202,_0x1490d4){const _0x4f4613=_0x1d566e,_0x15c30e=this;this[_0x4f4613('0x1a')][_0x4f4613('0xb')](function(){const _0x3696c4=_0x4f4613;return _0x15c30e[_0x3696c4('0x19')]['changeColumn'](_0xf06ddc,_0x599202,_0x1490d4)['then'](function(){const _0xb8c180=_0x3696c4;logger[_0xb8c180('0x9')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x599202,_0xf06ddc);})[_0x3696c4('0xf')](function(_0x298258){logger['info'](JSON['stringify'](_0x298258));});});},Migration[_0x1d566e('0x12')][_0x1d566e('0xd')]=function(_0x571bc8,_0x134467,_0x1fe5e8){const _0x37bb19=_0x1d566e,_0x31ee40=this;this[_0x37bb19('0x1a')][_0x37bb19('0xb')](function(){const _0x1c2f40=_0x37bb19;return _0x31ee40[_0x1c2f40('0x19')][_0x1c2f40('0xd')](_0x571bc8,_0x134467,_0x1fe5e8)[_0x1c2f40('0x17')](function(){const _0x3c1384=_0x1c2f40;logger[_0x3c1384('0x9')](_0x3c1384('0x3'),_0x134467,_0x571bc8);})['catch'](function(_0x2b6051){const _0x5576e6=_0x1c2f40;logger[_0x5576e6('0x9')](JSON[_0x5576e6('0x11')](_0x2b6051));});});},Migration[_0x1d566e('0x12')][_0x1d566e('0x6')]=function(_0x5e9433){const _0x129653=_0x1d566e,_0x595d15=this;this[_0x129653('0x1a')][_0x129653('0xb')](function(){const _0x3c7965=_0x129653;return _0x595d15[_0x3c7965('0x19')][_0x3c7965('0x6')](_0x5e9433,{'force':!![]})[_0x3c7965('0x17')](function(){const _0x2703fe=_0x3c7965;logger[_0x2703fe('0x9')]('table\x20dropped\x20%s',_0x5e9433);})[_0x3c7965('0xf')](function(_0x1242b0){logger['info'](JSON['stringify'](_0x1242b0));});});},Migration[_0x1d566e('0x12')][_0x1d566e('0x2')]=function(_0x446a62,_0x8d3552,_0x336fed){const _0x438870=this;this['sequence']['enqueue'](function(){const _0x502e10=a1009_0x21cf;return _0x438870[_0x502e10('0x19')]['addIndex'](_0x446a62,_0x8d3552,{'indexName':_0x336fed[_0x502e10('0x1')],'indicesType':_0x336fed['indicesType']})['then'](function(){const _0x1a88dd=_0x502e10;logger[_0x1a88dd('0x9')](_0x1a88dd('0x0'),_0x446a62,_0x8d3552[_0x1a88dd('0x4')](','),_0x336fed[_0x1a88dd('0x1')],_0x336fed[_0x1a88dd('0x10')]);})[_0x502e10('0xf')](function(_0x52a79d){const _0x5bb4d5=_0x502e10;logger[_0x5bb4d5('0x9')](JSON[_0x5bb4d5('0x11')](_0x52a79d));});});},Migration[_0x1d566e('0x12')]['removeIndex']=function(_0x3c3950,_0xe7370a){const _0x402b5f=_0x1d566e,_0x10cf9d=this;this[_0x402b5f('0x1a')][_0x402b5f('0xb')](function(){const _0xcc3b51=_0x402b5f;return _0x10cf9d['queryInterface']['removeIndex'](_0x3c3950,_0xe7370a)[_0xcc3b51('0x17')](function(){const _0xd0a469=_0xcc3b51;logger[_0xd0a469('0x9')]('removeIndex\x20%s\x20%s',_0x3c3950,_0xe7370a);})[_0xcc3b51('0xf')](function(_0x32004d){const _0x5a4959=_0xcc3b51;logger[_0x5a4959('0x9')](JSON[_0x5a4959('0x11')](_0x32004d));});});},Migration['prototype'][_0x1d566e('0x13')]=function(_0x38d6ed){const _0x582faf=_0x1d566e,_0x2ee3df=this;this[_0x582faf('0x1a')][_0x582faf('0xb')](function(){const _0x4c5705=_0x582faf;return _0x2ee3df[_0x4c5705('0x19')][_0x4c5705('0xa')][_0x4c5705('0x13')](_0x38d6ed)[_0x4c5705('0x17')](function(){const _0x1a064f=_0x4c5705;logger[_0x1a064f('0x9')](_0x1a064f('0xe'),_0x38d6ed);})[_0x4c5705('0xf')](function(_0x32e7a4){const _0x2f17db=_0x4c5705;logger[_0x2f17db('0x9')](JSON[_0x2f17db('0x11')](_0x32e7a4));});});},Migration[_0x1d566e('0x12')][_0x1d566e('0xc')]=function(_0x356d75,_0x54caf4){const _0x293cfd=_0x1d566e,_0xd8b262=this;this[_0x293cfd('0x1a')][_0x293cfd('0xb')](function(){const _0x3220f0=_0x293cfd;return _0xd8b262[_0x3220f0('0x19')][_0x3220f0('0xc')](_0x356d75,_0x54caf4)[_0x3220f0('0x17')](function(){const _0x58d4aa=_0x3220f0;logger['info'](_0x58d4aa('0x16'),_0x54caf4,_0x356d75);})['catch'](function(_0x31e5bb){const _0x2172f1=_0x3220f0;logger[_0x2172f1('0x9')](util[_0x2172f1('0x5')](_0x31e5bb,{'showHidden':![],'depth':null}));});});},Migration[_0x1d566e('0x12')][_0x1d566e('0x1b')]=function(_0x41ed60,_0xc501fd,_0x4e80ae){const _0x30a922=_0x1d566e,_0x13e574=this;this[_0x30a922('0x1a')][_0x30a922('0xb')](function(){const _0x194463=_0x30a922;return _0x13e574[_0x194463('0x19')][_0x194463('0x1b')](_0x41ed60,_0xc501fd,_0x4e80ae)[_0x194463('0x17')](function(){logger['info']('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0xc501fd,_0x4e80ae,_0x41ed60);})[_0x194463('0xf')](function(_0x1b33df){const _0x14eebe=_0x194463;logger[_0x14eebe('0x9')](util[_0x14eebe('0x5')](_0x1b33df,{'showHidden':![],'depth':null}));});});},Migration[_0x1d566e('0x12')][_0x1d566e('0x18')]=function(_0x5e382a){const _0x7b7479=_0x1d566e;this[_0x7b7479('0x1a')][_0x7b7479('0xb')](function(){return _0x5e382a();});},module[_0x1d566e('0x14')]={'up':function(_0x10fb2a){return new Promise(function(_0x332a1a){const _0x5c839b=a1009_0x21cf,_0x393a38=new Migration(_0x10fb2a);_0x393a38[_0x5c839b('0x18')](_0x332a1a);});},'down':function(){}};