Built motion from commit a9fb64cc6defd8fb3a5cc199221f878e91c0e969. Version 3.0.0...
[motion-next.git] / server / migrations / 2.5.4.js
1 const a1017_0x4b9a=['tail','migration','query','../config/logger','catch','inspect','sequence','Added\x20column\x20%s\x20to\x20%s','queryInterface','addIndex','Changed\x20column\x20%s\x20in\x20table\x20%s','finally','join','stringify','info','then','Removed\x20column\x20%s\x20from\x20%s','renameColumn','indicesType','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','dropTable','removeColumn','table\x20dropped\x20%s','indexName','prototype','sequelize','enqueue','addColumn'];(function(_0x110924,_0x4b9a60){const _0x27c350=function(_0x211637){while(--_0x211637){_0x110924['push'](_0x110924['shift']());}};_0x27c350(++_0x4b9a60);}(a1017_0x4b9a,0x184));const a1017_0x27c3=function(_0x110924,_0x4b9a60){_0x110924=_0x110924-0x0;let _0x27c350=a1017_0x4b9a[_0x110924];return _0x27c350;};const _0x11b0cf=a1017_0x27c3;'use strict';const util=require('util'),logger=require(_0x11b0cf('0x7'))(_0x11b0cf('0x5')),Sequence=function(){};Sequence[_0x11b0cf('0x0')][_0x11b0cf('0x2')]=function(_0x211637){const _0x198818=_0x11b0cf;this[_0x198818('0x4')]=this['tail']?this['tail'][_0x198818('0xf')](_0x211637):_0x211637();};const Migration=function(_0x15464f){const _0x542347=_0x11b0cf;this[_0x542347('0xc')]=_0x15464f,this[_0x542347('0xa')]=new Sequence();};Migration[_0x11b0cf('0x0')]['changeColumn']=function(_0x7a9da1,_0x523b22,_0x5ddcb3){const _0x3ac285=_0x11b0cf,_0x42cd77=this;this[_0x3ac285('0xa')][_0x3ac285('0x2')](function(){const _0x424680=_0x3ac285;return _0x42cd77[_0x424680('0xc')]['changeColumn'](_0x7a9da1,_0x523b22,_0x5ddcb3)[_0x424680('0x13')](function(){const _0x325e5c=_0x424680;logger[_0x325e5c('0x12')](_0x325e5c('0xe'),_0x523b22,_0x7a9da1);})[_0x424680('0x8')](function(_0x5aa21f){const _0x4ee61b=_0x424680;logger[_0x4ee61b('0x12')](JSON[_0x4ee61b('0x11')](_0x5aa21f));});});},Migration['prototype'][_0x11b0cf('0x3')]=function(_0x5078fe,_0x5d70f1,_0x3eea73){const _0x7e490a=_0x11b0cf,_0x5117cf=this;this['sequence'][_0x7e490a('0x2')](function(){const _0x45040f=_0x7e490a;return _0x5117cf[_0x45040f('0xc')][_0x45040f('0x3')](_0x5078fe,_0x5d70f1,_0x3eea73)[_0x45040f('0x13')](function(){const _0x565c90=_0x45040f;logger[_0x565c90('0x12')](_0x565c90('0xb'),_0x5d70f1,_0x5078fe);})[_0x45040f('0x8')](function(_0x2db7f5){logger['info'](JSON['stringify'](_0x2db7f5));});});},Migration[_0x11b0cf('0x0')]['dropTable']=function(_0x4bf8a0){const _0x1d9139=_0x11b0cf,_0x490d5a=this;this[_0x1d9139('0xa')][_0x1d9139('0x2')](function(){const _0xf73744=_0x1d9139;return _0x490d5a[_0xf73744('0xc')][_0xf73744('0x18')](_0x4bf8a0,{'force':!![]})[_0xf73744('0x13')](function(){const _0x4f2dd7=_0xf73744;logger[_0x4f2dd7('0x12')](_0x4f2dd7('0x1a'),_0x4bf8a0);})[_0xf73744('0x8')](function(_0x54e264){const _0x5d9e96=_0xf73744;logger[_0x5d9e96('0x12')](JSON[_0x5d9e96('0x11')](_0x54e264));});});},Migration['prototype']['addIndex']=function(_0x2f0a63,_0x593ac1,_0x502aa6){const _0x26618a=_0x11b0cf,_0x2cb5d4=this;this[_0x26618a('0xa')][_0x26618a('0x2')](function(){const _0x1add4f=_0x26618a;return _0x2cb5d4[_0x1add4f('0xc')][_0x1add4f('0xd')](_0x2f0a63,_0x593ac1,{'indexName':_0x502aa6[_0x1add4f('0x1b')],'indicesType':_0x502aa6[_0x1add4f('0x16')]})[_0x1add4f('0x13')](function(){const _0x3c670d=_0x1add4f;logger[_0x3c670d('0x12')]('addIndex\x20%s\x20%s\x20%s\x20[%s]',_0x2f0a63,_0x593ac1[_0x3c670d('0x10')](','),_0x502aa6['indexName'],_0x502aa6[_0x3c670d('0x16')]);})[_0x1add4f('0x8')](function(_0x31eead){const _0x19e0ab=_0x1add4f;logger['info'](JSON[_0x19e0ab('0x11')](_0x31eead));});});},Migration[_0x11b0cf('0x0')]['removeIndex']=function(_0x48db0a,_0x57b44e){const _0x1c6891=_0x11b0cf,_0x3032f6=this;this[_0x1c6891('0xa')][_0x1c6891('0x2')](function(){const _0x484134=_0x1c6891;return _0x3032f6[_0x484134('0xc')]['removeIndex'](_0x48db0a,_0x57b44e)[_0x484134('0x13')](function(){const _0x1be040=_0x484134;logger[_0x1be040('0x12')]('removeIndex\x20%s\x20%s',_0x48db0a,_0x57b44e);})['catch'](function(_0x54c19e){const _0x570b67=_0x484134;logger[_0x570b67('0x12')](JSON['stringify'](_0x54c19e));});});},Migration[_0x11b0cf('0x0')][_0x11b0cf('0x6')]=function(_0x16a78b){const _0x4e9d9d=_0x11b0cf,_0x1715f7=this;this[_0x4e9d9d('0xa')][_0x4e9d9d('0x2')](function(){const _0x37620a=_0x4e9d9d;return _0x1715f7[_0x37620a('0xc')][_0x37620a('0x1')][_0x37620a('0x6')](_0x16a78b)['then'](function(){const _0x124416=_0x37620a;logger[_0x124416('0x12')]('query\x20%s',_0x16a78b);})[_0x37620a('0x8')](function(_0x48b4e1){const _0x1978d1=_0x37620a;logger[_0x1978d1('0x12')](JSON[_0x1978d1('0x11')](_0x48b4e1));});});},Migration['prototype'][_0x11b0cf('0x19')]=function(_0x3f9cf3,_0x1f0baa){const _0x59ff7f=_0x11b0cf,_0x1916b3=this;this[_0x59ff7f('0xa')][_0x59ff7f('0x2')](function(){const _0x473565=_0x59ff7f;return _0x1916b3['queryInterface']['removeColumn'](_0x3f9cf3,_0x1f0baa)[_0x473565('0x13')](function(){const _0x21b912=_0x473565;logger['info'](_0x21b912('0x14'),_0x1f0baa,_0x3f9cf3);})[_0x473565('0x8')](function(_0x1fdc1b){const _0x967fe3=_0x473565;logger[_0x967fe3('0x12')](util[_0x967fe3('0x9')](_0x1fdc1b,{'showHidden':![],'depth':null}));});});},Migration[_0x11b0cf('0x0')][_0x11b0cf('0x15')]=function(_0xa7dc30,_0x440783,_0x5eb3d2){const _0x3d7df3=_0x11b0cf,_0x1739a2=this;this[_0x3d7df3('0xa')][_0x3d7df3('0x2')](function(){const _0x32f6b7=_0x3d7df3;return _0x1739a2[_0x32f6b7('0xc')][_0x32f6b7('0x15')](_0xa7dc30,_0x440783,_0x5eb3d2)[_0x32f6b7('0x13')](function(){const _0x97eeb1=_0x32f6b7;logger[_0x97eeb1('0x12')](_0x97eeb1('0x17'),_0x440783,_0x5eb3d2,_0xa7dc30);})['catch'](function(_0x406cde){const _0x4d7f93=_0x32f6b7;logger[_0x4d7f93('0x12')](util[_0x4d7f93('0x9')](_0x406cde,{'showHidden':![],'depth':null}));});});},Migration['prototype']['final']=function(_0x880aa0){const _0xab9bed=_0x11b0cf;this[_0xab9bed('0xa')][_0xab9bed('0x2')](function(){return _0x880aa0();});},module['exports']={'up':function(_0x36224a){return new Promise(function(_0x2c42e9){const _0x5af4f8=new Migration(_0x36224a);_0x5af4f8['final'](_0x2c42e9);});},'down':function(){}};