42d0be6d68b645c331310c1cad4906c07854c857
[motion-next.git] / server / migrations / 2.2.5.js
1 const a970_0x3bc5=['removeIndex','finally','sequelize','Removed\x20column\x20%s\x20from\x20%s','exports','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','enqueue','addIndex\x20%s\x20%s\x20%s','table\x20dropped\x20%s','final','then','Added\x20column\x20%s\x20to\x20%s','addIndex','inspect','tail','renameColumn','addColumn','query','removeIndex\x20%s\x20%s','dropTable','prototype','queryInterface','catch','sequence','changeColumn','query\x20%s','info','stringify'];(function(_0x12fb3c,_0x3bc578){const _0x1c2e61=function(_0xd6f685){while(--_0xd6f685){_0x12fb3c['push'](_0x12fb3c['shift']());}};_0x1c2e61(++_0x3bc578);}(a970_0x3bc5,0x1bf));const a970_0x1c2e=function(_0x12fb3c,_0x3bc578){_0x12fb3c=_0x12fb3c-0x0;let _0x1c2e61=a970_0x3bc5[_0x12fb3c];return _0x1c2e61;};const _0xb3931f=a970_0x1c2e;'use strict';const util=require('util'),logger=require('../config/logger')('migration'),Sequence=function(){};Sequence['prototype'][_0xb3931f('0x7')]=function(_0xd6f685){const _0x341c0d=_0xb3931f;this[_0x341c0d('0xf')]=this[_0x341c0d('0xf')]?this[_0x341c0d('0xf')][_0x341c0d('0x2')](_0xd6f685):_0xd6f685();};const Migration=function(_0x2175a1){const _0x23f6d2=_0xb3931f;this['queryInterface']=_0x2175a1,this[_0x23f6d2('0x18')]=new Sequence();};Migration['prototype']['changeColumn']=function(_0x475d5d,_0x53a8ae,_0x46163d){const _0x49aff3=_0xb3931f,_0x213417=this;this[_0x49aff3('0x18')][_0x49aff3('0x7')](function(){const _0x2988e1=_0x49aff3;return _0x213417[_0x2988e1('0x16')][_0x2988e1('0x19')](_0x475d5d,_0x53a8ae,_0x46163d)['then'](function(){logger['info']('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x53a8ae,_0x475d5d);})[_0x2988e1('0x17')](function(_0x54e667){const _0xc24b1b=_0x2988e1;logger[_0xc24b1b('0x1b')](JSON[_0xc24b1b('0x0')](_0x54e667));});});},Migration['prototype'][_0xb3931f('0x11')]=function(_0x5541a9,_0x4f1ed3,_0x401d6b){const _0x211c98=_0xb3931f,_0x2c5725=this;this[_0x211c98('0x18')]['enqueue'](function(){const _0x308743=_0x211c98;return _0x2c5725[_0x308743('0x16')][_0x308743('0x11')](_0x5541a9,_0x4f1ed3,_0x401d6b)[_0x308743('0xb')](function(){const _0x2f15b4=_0x308743;logger[_0x2f15b4('0x1b')](_0x2f15b4('0xc'),_0x4f1ed3,_0x5541a9);})[_0x308743('0x17')](function(_0x24eb41){logger['info'](JSON['stringify'](_0x24eb41));});});},Migration['prototype'][_0xb3931f('0x14')]=function(_0x42cfce){const _0x267cfe=_0xb3931f,_0x194170=this;this[_0x267cfe('0x18')][_0x267cfe('0x7')](function(){const _0x2cd2f6=_0x267cfe;return _0x194170[_0x2cd2f6('0x16')][_0x2cd2f6('0x14')](_0x42cfce,{'force':!![]})[_0x2cd2f6('0xb')](function(){const _0x547c57=_0x2cd2f6;logger[_0x547c57('0x1b')](_0x547c57('0x9'),_0x42cfce);})['catch'](function(_0x3123b0){const _0x20df47=_0x2cd2f6;logger[_0x20df47('0x1b')](JSON[_0x20df47('0x0')](_0x3123b0));});});},Migration['prototype']['addIndex']=function(_0x28964e,_0x504b65,_0x523fcb){const _0x5f52ce=_0xb3931f,_0x51f18f=this;this[_0x5f52ce('0x18')][_0x5f52ce('0x7')](function(){const _0x1554bf=_0x5f52ce;return _0x51f18f[_0x1554bf('0x16')][_0x1554bf('0xd')](_0x28964e,_0x504b65,{'indexName':_0x523fcb})['then'](function(){const _0x4b51df=_0x1554bf;logger[_0x4b51df('0x1b')](_0x4b51df('0x8'),_0x28964e,_0x504b65['join'](','),_0x523fcb);})[_0x1554bf('0x17')](function(_0x5abcbf){const _0x528a6b=_0x1554bf;logger['info'](JSON[_0x528a6b('0x0')](_0x5abcbf));});});},Migration[_0xb3931f('0x15')]['removeIndex']=function(_0x5e89a1,_0x11cc1d){const _0x3c5bc1=_0xb3931f,_0x43cc11=this;this[_0x3c5bc1('0x18')]['enqueue'](function(){const _0x3b9716=_0x3c5bc1;return _0x43cc11[_0x3b9716('0x16')][_0x3b9716('0x1')](_0x5e89a1,_0x11cc1d)[_0x3b9716('0xb')](function(){const _0x5bebd4=_0x3b9716;logger[_0x5bebd4('0x1b')](_0x5bebd4('0x13'),_0x5e89a1,_0x11cc1d);})[_0x3b9716('0x17')](function(_0x1f24bc){const _0x56e91d=_0x3b9716;logger[_0x56e91d('0x1b')](JSON['stringify'](_0x1f24bc));});});},Migration[_0xb3931f('0x15')][_0xb3931f('0x12')]=function(_0x53ab58){const _0x51582f=_0xb3931f,_0x554f5d=this;this[_0x51582f('0x18')][_0x51582f('0x7')](function(){const _0x263146=_0x51582f;return _0x554f5d[_0x263146('0x16')][_0x263146('0x3')][_0x263146('0x12')](_0x53ab58)[_0x263146('0xb')](function(){const _0x28f367=_0x263146;logger[_0x28f367('0x1b')](_0x28f367('0x1a'),_0x53ab58);})['catch'](function(_0x408e61){const _0x2a61b2=_0x263146;logger[_0x2a61b2('0x1b')](JSON[_0x2a61b2('0x0')](_0x408e61));});});},Migration[_0xb3931f('0x15')]['removeColumn']=function(_0x3f779e,_0x5c25a5){const _0x126494=_0xb3931f,_0x2d1838=this;this['sequence'][_0x126494('0x7')](function(){const _0x1b78ee=_0x126494;return _0x2d1838[_0x1b78ee('0x16')]['removeColumn'](_0x3f779e,_0x5c25a5)[_0x1b78ee('0xb')](function(){const _0x3f0874=_0x1b78ee;logger[_0x3f0874('0x1b')](_0x3f0874('0x4'),_0x5c25a5,_0x3f779e);})[_0x1b78ee('0x17')](function(_0x20c2ea){const _0x49fd41=_0x1b78ee;logger['info'](util[_0x49fd41('0xe')](_0x20c2ea,{'showHidden':![],'depth':null}));});});},Migration[_0xb3931f('0x15')]['renameColumn']=function(_0x4a3eec,_0x343588,_0x157f91){const _0x283327=_0xb3931f,_0x3a6a2b=this;this['sequence'][_0x283327('0x7')](function(){const _0x580b1b=_0x283327;return _0x3a6a2b[_0x580b1b('0x16')][_0x580b1b('0x10')](_0x4a3eec,_0x343588,_0x157f91)['then'](function(){const _0x2a6c42=_0x580b1b;logger['info'](_0x2a6c42('0x6'),_0x343588,_0x157f91,_0x4a3eec);})[_0x580b1b('0x17')](function(_0x38011e){const _0x35f44a=_0x580b1b;logger['info'](util[_0x35f44a('0xe')](_0x38011e,{'showHidden':![],'depth':null}));});});},Migration[_0xb3931f('0x15')][_0xb3931f('0xa')]=function(_0x5a480a){const _0x1422c0=_0xb3931f;this[_0x1422c0('0x18')][_0x1422c0('0x7')](function(){return _0x5a480a();});},module[_0xb3931f('0x5')]={'up':function(_0x5ec28c){return new Promise(function(_0x108fa2){const _0x206c8b=new Migration(_0x5ec28c);_0x206c8b['final'](_0x108fa2);});},'down':function(){}};