6f8f7402cbb7d0f60c67b8c94f289f6b1c6cfbcb
[motion-next.git] / server / migrations / 2.4.6.js
1 const a1009_0x4dcc=['Added\x20column\x20%s\x20to\x20%s','catch','addIndex\x20%s\x20%s\x20%s\x20[%s]','info','enqueue','inspect','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','query\x20%s','Removed\x20column\x20%s\x20from\x20%s','Changed\x20column\x20%s\x20in\x20table\x20%s','table\x20dropped\x20%s','then','prototype','addColumn','queryInterface','final','migration','addIndex','stringify','dropTable','removeIndex','indicesType','finally','tail','util','indexName','removeColumn','exports','sequelize','join','sequence','changeColumn','renameColumn','query'];(function(_0x2d1e7e,_0x4dcc1d){const _0x15b26f=function(_0x319342){while(--_0x319342){_0x2d1e7e['push'](_0x2d1e7e['shift']());}};_0x15b26f(++_0x4dcc1d);}(a1009_0x4dcc,0x90));const a1009_0x15b2=function(_0x2d1e7e,_0x4dcc1d){_0x2d1e7e=_0x2d1e7e-0x0;let _0x15b26f=a1009_0x4dcc[_0x2d1e7e];return _0x15b26f;};const _0x1f6b1f=a1009_0x15b2;'use strict';const util=require(_0x1f6b1f('0x10')),logger=require('../config/logger')(_0x1f6b1f('0x8')),Sequence=function(){};Sequence['prototype'][_0x1f6b1f('0x1e')]=function(_0x319342){const _0x6e2986=_0x1f6b1f;this[_0x6e2986('0xf')]=this['tail']?this['tail'][_0x6e2986('0xe')](_0x319342):_0x319342();};const Migration=function(_0x5f0162){const _0x17cafd=_0x1f6b1f;this[_0x17cafd('0x6')]=_0x5f0162,this[_0x17cafd('0x16')]=new Sequence();};Migration[_0x1f6b1f('0x4')]['changeColumn']=function(_0x3aa918,_0x1229dc,_0x59fd8e){const _0x1a52c4=this;this['sequence']['enqueue'](function(){const _0x4578c8=a1009_0x15b2;return _0x1a52c4['queryInterface'][_0x4578c8('0x17')](_0x3aa918,_0x1229dc,_0x59fd8e)[_0x4578c8('0x3')](function(){const _0x218a57=_0x4578c8;logger[_0x218a57('0x1d')](_0x218a57('0x1'),_0x1229dc,_0x3aa918);})[_0x4578c8('0x1b')](function(_0x545952){const _0x24e84d=_0x4578c8;logger[_0x24e84d('0x1d')](JSON[_0x24e84d('0xa')](_0x545952));});});},Migration[_0x1f6b1f('0x4')]['addColumn']=function(_0x9ea715,_0x245f80,_0xcaabf4){const _0x2ef852=_0x1f6b1f,_0x9c9eac=this;this[_0x2ef852('0x16')][_0x2ef852('0x1e')](function(){const _0x224101=_0x2ef852;return _0x9c9eac[_0x224101('0x6')][_0x224101('0x5')](_0x9ea715,_0x245f80,_0xcaabf4)[_0x224101('0x3')](function(){const _0x35ed4c=_0x224101;logger['info'](_0x35ed4c('0x1a'),_0x245f80,_0x9ea715);})[_0x224101('0x1b')](function(_0x4ffd12){const _0x11e2af=_0x224101;logger[_0x11e2af('0x1d')](JSON[_0x11e2af('0xa')](_0x4ffd12));});});},Migration[_0x1f6b1f('0x4')]['dropTable']=function(_0x1d17f4){const _0x33bd74=_0x1f6b1f,_0x533999=this;this[_0x33bd74('0x16')][_0x33bd74('0x1e')](function(){const _0x202f0e=_0x33bd74;return _0x533999[_0x202f0e('0x6')][_0x202f0e('0xb')](_0x1d17f4,{'force':!![]})[_0x202f0e('0x3')](function(){const _0x5a47a1=_0x202f0e;logger[_0x5a47a1('0x1d')](_0x5a47a1('0x2'),_0x1d17f4);})[_0x202f0e('0x1b')](function(_0x11a086){const _0x58c4a0=_0x202f0e;logger[_0x58c4a0('0x1d')](JSON[_0x58c4a0('0xa')](_0x11a086));});});},Migration[_0x1f6b1f('0x4')]['addIndex']=function(_0x215322,_0x4ad1d4,_0x4246fb){const _0x159460=_0x1f6b1f,_0x56590c=this;this[_0x159460('0x16')][_0x159460('0x1e')](function(){const _0x28f2ce=_0x159460;return _0x56590c[_0x28f2ce('0x6')][_0x28f2ce('0x9')](_0x215322,_0x4ad1d4,{'indexName':_0x4246fb[_0x28f2ce('0x11')],'indicesType':_0x4246fb[_0x28f2ce('0xd')]})['then'](function(){const _0x1ed5c6=_0x28f2ce;logger[_0x1ed5c6('0x1d')](_0x1ed5c6('0x1c'),_0x215322,_0x4ad1d4[_0x1ed5c6('0x15')](','),_0x4246fb[_0x1ed5c6('0x11')],_0x4246fb['indicesType']);})[_0x28f2ce('0x1b')](function(_0x3b63aa){const _0x2015ca=_0x28f2ce;logger[_0x2015ca('0x1d')](JSON[_0x2015ca('0xa')](_0x3b63aa));});});},Migration[_0x1f6b1f('0x4')][_0x1f6b1f('0xc')]=function(_0x1a4596,_0x9030a7){const _0x7b3b6d=_0x1f6b1f,_0x2dd42b=this;this[_0x7b3b6d('0x16')][_0x7b3b6d('0x1e')](function(){const _0x3bb859=_0x7b3b6d;return _0x2dd42b[_0x3bb859('0x6')][_0x3bb859('0xc')](_0x1a4596,_0x9030a7)[_0x3bb859('0x3')](function(){const _0x251ef4=_0x3bb859;logger[_0x251ef4('0x1d')]('removeIndex\x20%s\x20%s',_0x1a4596,_0x9030a7);})['catch'](function(_0x272043){const _0xbb601d=_0x3bb859;logger[_0xbb601d('0x1d')](JSON[_0xbb601d('0xa')](_0x272043));});});},Migration[_0x1f6b1f('0x4')][_0x1f6b1f('0x19')]=function(_0x73dd42){const _0x44a8bb=_0x1f6b1f,_0x3ef6c9=this;this[_0x44a8bb('0x16')][_0x44a8bb('0x1e')](function(){const _0x4928c7=_0x44a8bb;return _0x3ef6c9[_0x4928c7('0x6')][_0x4928c7('0x14')][_0x4928c7('0x19')](_0x73dd42)[_0x4928c7('0x3')](function(){const _0x4e9a80=_0x4928c7;logger[_0x4e9a80('0x1d')](_0x4e9a80('0x21'),_0x73dd42);})[_0x4928c7('0x1b')](function(_0x352262){const _0x1a5024=_0x4928c7;logger['info'](JSON[_0x1a5024('0xa')](_0x352262));});});},Migration[_0x1f6b1f('0x4')][_0x1f6b1f('0x12')]=function(_0x28d1d0,_0x419587){const _0x20069c=_0x1f6b1f,_0x5683d9=this;this['sequence'][_0x20069c('0x1e')](function(){const _0x588576=_0x20069c;return _0x5683d9[_0x588576('0x6')][_0x588576('0x12')](_0x28d1d0,_0x419587)[_0x588576('0x3')](function(){const _0x440d26=_0x588576;logger[_0x440d26('0x1d')](_0x440d26('0x0'),_0x419587,_0x28d1d0);})[_0x588576('0x1b')](function(_0x17d27b){const _0x5c982d=_0x588576;logger[_0x5c982d('0x1d')](util[_0x5c982d('0x1f')](_0x17d27b,{'showHidden':![],'depth':null}));});});},Migration[_0x1f6b1f('0x4')][_0x1f6b1f('0x18')]=function(_0x562ffc,_0xe5836b,_0x1c7e7f){const _0x552974=_0x1f6b1f,_0x48cd1b=this;this[_0x552974('0x16')][_0x552974('0x1e')](function(){const _0x301ece=_0x552974;return _0x48cd1b['queryInterface'][_0x301ece('0x18')](_0x562ffc,_0xe5836b,_0x1c7e7f)[_0x301ece('0x3')](function(){const _0x498e0f=_0x301ece;logger[_0x498e0f('0x1d')](_0x498e0f('0x20'),_0xe5836b,_0x1c7e7f,_0x562ffc);})[_0x301ece('0x1b')](function(_0x578f7b){const _0x4de1c5=_0x301ece;logger[_0x4de1c5('0x1d')](util['inspect'](_0x578f7b,{'showHidden':![],'depth':null}));});});},Migration[_0x1f6b1f('0x4')][_0x1f6b1f('0x7')]=function(_0x33715d){const _0x4a1edf=_0x1f6b1f;this[_0x4a1edf('0x16')][_0x4a1edf('0x1e')](function(){return _0x33715d();});},module[_0x1f6b1f('0x13')]={'up':function(_0xd601e1){return new Promise(function(_0x5c289b){const _0x54a1a3=new Migration(_0xd601e1);_0x54a1a3['final'](_0x5c289b);});},'down':function(){}};