a19064a2beee527fd04ae184fb9619ed728ffa88
[motion-next.git] / server / migrations / 2.2.2.js
1 const a966_0x1224=['removeIndex\x20%s\x20%s','queryInterface','exports','inspect','removeColumn','addColumn','migration','then','prototype','catch','table\x20dropped\x20%s','addIndex\x20%s\x20%s\x20%s','info','final','../config/logger','renameColumn','sequence','removeIndex','dropTable','query','stringify','addIndex','tail','Added\x20column\x20%s\x20to\x20%s','util','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','finally','changeColumn','enqueue','Changed\x20column\x20%s\x20in\x20table\x20%s'];(function(_0x498ccc,_0x12249e){const _0x438faf=function(_0x4a7032){while(--_0x4a7032){_0x498ccc['push'](_0x498ccc['shift']());}};_0x438faf(++_0x12249e);}(a966_0x1224,0x10a));const a966_0x438f=function(_0x498ccc,_0x12249e){_0x498ccc=_0x498ccc-0x0;let _0x438faf=a966_0x1224[_0x498ccc];return _0x438faf;};const _0x2bcd26=a966_0x438f;'use strict';const util=require(_0x2bcd26('0x1c')),logger=require(_0x2bcd26('0x12'))(_0x2bcd26('0xa')),Sequence=function(){};Sequence[_0x2bcd26('0xc')][_0x2bcd26('0x2')]=function(_0x4a7032){const _0xe005d9=_0x2bcd26;this[_0xe005d9('0x1a')]=this[_0xe005d9('0x1a')]?this['tail'][_0xe005d9('0x0')](_0x4a7032):_0x4a7032();};const Migration=function(_0x3d136d){const _0x1f12aa=_0x2bcd26;this[_0x1f12aa('0x5')]=_0x3d136d,this['sequence']=new Sequence();};Migration[_0x2bcd26('0xc')][_0x2bcd26('0x1')]=function(_0x405700,_0x5ada4c,_0x74575d){const _0x42571c=_0x2bcd26,_0x1f5bb0=this;this['sequence'][_0x42571c('0x2')](function(){const _0x44bcc8=_0x42571c;return _0x1f5bb0['queryInterface'][_0x44bcc8('0x1')](_0x405700,_0x5ada4c,_0x74575d)[_0x44bcc8('0xb')](function(){const _0xcb8762=_0x44bcc8;logger['info'](_0xcb8762('0x3'),_0x5ada4c,_0x405700);})[_0x44bcc8('0xd')](function(_0x57a441){const _0x4c38fa=_0x44bcc8;logger[_0x4c38fa('0x10')](JSON[_0x4c38fa('0x18')](_0x57a441));});});},Migration[_0x2bcd26('0xc')][_0x2bcd26('0x9')]=function(_0x3dfc08,_0x2230ac,_0xbfb0f8){const _0x47551e=_0x2bcd26,_0x523560=this;this[_0x47551e('0x14')]['enqueue'](function(){const _0x4e7134=_0x47551e;return _0x523560[_0x4e7134('0x5')][_0x4e7134('0x9')](_0x3dfc08,_0x2230ac,_0xbfb0f8)['then'](function(){const _0x33a398=_0x4e7134;logger[_0x33a398('0x10')](_0x33a398('0x1b'),_0x2230ac,_0x3dfc08);})[_0x4e7134('0xd')](function(_0x1ee879){const _0x1c72bb=_0x4e7134;logger[_0x1c72bb('0x10')](JSON[_0x1c72bb('0x18')](_0x1ee879));});});},Migration[_0x2bcd26('0xc')][_0x2bcd26('0x16')]=function(_0x1416d4){const _0x506910=this;this['sequence']['enqueue'](function(){const _0x57322e=a966_0x438f;return _0x506910[_0x57322e('0x5')][_0x57322e('0x16')](_0x1416d4,{'force':!![]})[_0x57322e('0xb')](function(){const _0x3febcc=_0x57322e;logger['info'](_0x3febcc('0xe'),_0x1416d4);})['catch'](function(_0xb0e1eb){const _0x3f6232=_0x57322e;logger[_0x3f6232('0x10')](JSON[_0x3f6232('0x18')](_0xb0e1eb));});});},Migration[_0x2bcd26('0xc')]['addIndex']=function(_0x3acff4,_0x418a9c,_0x5bd9a8){const _0x521256=_0x2bcd26,_0x10b7e4=this;this[_0x521256('0x14')]['enqueue'](function(){const _0x1ee199=_0x521256;return _0x10b7e4[_0x1ee199('0x5')][_0x1ee199('0x19')](_0x3acff4,_0x418a9c,{'indexName':_0x5bd9a8})['then'](function(){const _0x38d65c=_0x1ee199;logger[_0x38d65c('0x10')](_0x38d65c('0xf'),_0x3acff4,_0x418a9c['join'](','),_0x5bd9a8);})[_0x1ee199('0xd')](function(_0x326ede){const _0x30a941=_0x1ee199;logger[_0x30a941('0x10')](JSON[_0x30a941('0x18')](_0x326ede));});});},Migration[_0x2bcd26('0xc')][_0x2bcd26('0x15')]=function(_0x318c77,_0x3a4ee1){const _0x24ad10=_0x2bcd26,_0xef7c80=this;this[_0x24ad10('0x14')][_0x24ad10('0x2')](function(){const _0xc56c65=_0x24ad10;return _0xef7c80[_0xc56c65('0x5')][_0xc56c65('0x15')](_0x318c77,_0x3a4ee1)[_0xc56c65('0xb')](function(){const _0x1e89a3=_0xc56c65;logger['info'](_0x1e89a3('0x4'),_0x318c77,_0x3a4ee1);})[_0xc56c65('0xd')](function(_0x43ce28){const _0x64da1c=_0xc56c65;logger[_0x64da1c('0x10')](JSON[_0x64da1c('0x18')](_0x43ce28));});});},Migration[_0x2bcd26('0xc')]['query']=function(_0xa9df48){const _0x37a0bc=_0x2bcd26,_0x3de35c=this;this['sequence'][_0x37a0bc('0x2')](function(){const _0xd24591=_0x37a0bc;return _0x3de35c[_0xd24591('0x5')]['sequelize'][_0xd24591('0x17')](_0xa9df48)[_0xd24591('0xb')](function(){const _0x2431cf=_0xd24591;logger[_0x2431cf('0x10')]('query\x20%s',_0xa9df48);})[_0xd24591('0xd')](function(_0x9ec75a){const _0x51155b=_0xd24591;logger[_0x51155b('0x10')](JSON['stringify'](_0x9ec75a));});});},Migration[_0x2bcd26('0xc')][_0x2bcd26('0x8')]=function(_0x4e14ee,_0xd3650a){const _0x279f3c=_0x2bcd26,_0xf4976d=this;this[_0x279f3c('0x14')][_0x279f3c('0x2')](function(){const _0x5bfee4=_0x279f3c;return _0xf4976d[_0x5bfee4('0x5')][_0x5bfee4('0x8')](_0x4e14ee,_0xd3650a)[_0x5bfee4('0xb')](function(){const _0x104cc1=_0x5bfee4;logger[_0x104cc1('0x10')]('Removed\x20column\x20%s\x20from\x20%s',_0xd3650a,_0x4e14ee);})[_0x5bfee4('0xd')](function(_0x117bbc){const _0x28463c=_0x5bfee4;logger[_0x28463c('0x10')](util[_0x28463c('0x7')](_0x117bbc,{'showHidden':![],'depth':null}));});});},Migration[_0x2bcd26('0xc')][_0x2bcd26('0x13')]=function(_0x5ac7cd,_0x3ef654,_0x4f6bf9){const _0x18faef=_0x2bcd26,_0x35c2e4=this;this[_0x18faef('0x14')][_0x18faef('0x2')](function(){const _0x1eda57=_0x18faef;return _0x35c2e4[_0x1eda57('0x5')][_0x1eda57('0x13')](_0x5ac7cd,_0x3ef654,_0x4f6bf9)['then'](function(){const _0x398f21=_0x1eda57;logger['info'](_0x398f21('0x1d'),_0x3ef654,_0x4f6bf9,_0x5ac7cd);})[_0x1eda57('0xd')](function(_0x1472d8){const _0x2668de=_0x1eda57;logger[_0x2668de('0x10')](util[_0x2668de('0x7')](_0x1472d8,{'showHidden':![],'depth':null}));});});},Migration[_0x2bcd26('0xc')][_0x2bcd26('0x11')]=function(_0x43f973){const _0x1da42f=_0x2bcd26;this[_0x1da42f('0x14')]['enqueue'](function(){return _0x43f973();});},module[_0x2bcd26('0x6')]={'up':function(_0xc756aa){return new Promise(function(_0x42c4e4){const _0x112616=a966_0x438f,_0x7468ea=new Migration(_0xc756aa);_0x7468ea[_0x112616('0x11')](_0x42c4e4);});},'down':function(){}};