Built motion from commit bfc7a72f7045b27461c9a5d1f71c1a658cfd0b8b. Version 3.0.0...
[motion-next.git] / server / migrations / 2.4.21.js
1 const a1005_0x298f=['indexName','finally','addIndex\x20%s\x20%s\x20%s\x20[%s]','final','stringify','inspect','sequelize','prototype','removeIndex','sequence','queryInterface','removeIndex\x20%s\x20%s','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','then','util','addColumn','renameColumn','join','query','catch','changeColumn','exports','info','removeColumn','indicesType','enqueue','Added\x20column\x20%s\x20to\x20%s','dropTable','query\x20%s','addIndex','Changed\x20column\x20%s\x20in\x20table\x20%s','../config/logger','tail'];(function(_0x1b1769,_0x298f4d){const _0x216669=function(_0x3ffcff){while(--_0x3ffcff){_0x1b1769['push'](_0x1b1769['shift']());}};_0x216669(++_0x298f4d);}(a1005_0x298f,0x117));const a1005_0x2166=function(_0x1b1769,_0x298f4d){_0x1b1769=_0x1b1769-0x0;let _0x216669=a1005_0x298f[_0x1b1769];return _0x216669;};const _0x4210b9=a1005_0x2166;'use strict';const util=require(_0x4210b9('0x20')),logger=require(_0x4210b9('0x10'))('migration'),Sequence=function(){};Sequence[_0x4210b9('0x19')][_0x4210b9('0xa')]=function(_0x3ffcff){const _0x29fb11=_0x4210b9;this[_0x29fb11('0x11')]=this['tail']?this[_0x29fb11('0x11')][_0x29fb11('0x13')](_0x3ffcff):_0x3ffcff();};const Migration=function(_0x1886ec){const _0x5c9c34=_0x4210b9;this[_0x5c9c34('0x1c')]=_0x1886ec,this['sequence']=new Sequence();};Migration[_0x4210b9('0x19')][_0x4210b9('0x5')]=function(_0x5a0fda,_0x4ca41a,_0x57048e){const _0x4497de=_0x4210b9,_0x59f4c5=this;this['sequence'][_0x4497de('0xa')](function(){const _0x43cf51=_0x4497de;return _0x59f4c5[_0x43cf51('0x1c')][_0x43cf51('0x5')](_0x5a0fda,_0x4ca41a,_0x57048e)[_0x43cf51('0x1f')](function(){const _0x359dc6=_0x43cf51;logger[_0x359dc6('0x7')](_0x359dc6('0xf'),_0x4ca41a,_0x5a0fda);})[_0x43cf51('0x4')](function(_0x1e9d80){const _0x24b959=_0x43cf51;logger[_0x24b959('0x7')](JSON[_0x24b959('0x16')](_0x1e9d80));});});},Migration['prototype']['addColumn']=function(_0x591ede,_0x4c5593,_0x1a6c4c){const _0xdf9cce=_0x4210b9,_0x336bf1=this;this['sequence'][_0xdf9cce('0xa')](function(){const _0xb4a379=_0xdf9cce;return _0x336bf1['queryInterface'][_0xb4a379('0x0')](_0x591ede,_0x4c5593,_0x1a6c4c)[_0xb4a379('0x1f')](function(){const _0xcc417c=_0xb4a379;logger[_0xcc417c('0x7')](_0xcc417c('0xb'),_0x4c5593,_0x591ede);})[_0xb4a379('0x4')](function(_0x3e1e7e){const _0x5d8326=_0xb4a379;logger[_0x5d8326('0x7')](JSON[_0x5d8326('0x16')](_0x3e1e7e));});});},Migration[_0x4210b9('0x19')]['dropTable']=function(_0x4aa45a){const _0x240f7c=_0x4210b9,_0x3de1bf=this;this[_0x240f7c('0x1b')][_0x240f7c('0xa')](function(){const _0x806e4f=_0x240f7c;return _0x3de1bf[_0x806e4f('0x1c')][_0x806e4f('0xc')](_0x4aa45a,{'force':!![]})[_0x806e4f('0x1f')](function(){const _0x34562d=_0x806e4f;logger[_0x34562d('0x7')]('table\x20dropped\x20%s',_0x4aa45a);})[_0x806e4f('0x4')](function(_0x1bb3a7){const _0x2e2c83=_0x806e4f;logger[_0x2e2c83('0x7')](JSON['stringify'](_0x1bb3a7));});});},Migration[_0x4210b9('0x19')][_0x4210b9('0xe')]=function(_0x1e6232,_0x55def8,_0x456878){const _0x24eac8=_0x4210b9,_0xa0e429=this;this[_0x24eac8('0x1b')][_0x24eac8('0xa')](function(){const _0x1844cc=_0x24eac8;return _0xa0e429[_0x1844cc('0x1c')][_0x1844cc('0xe')](_0x1e6232,_0x55def8,{'indexName':_0x456878['indexName'],'indicesType':_0x456878[_0x1844cc('0x9')]})[_0x1844cc('0x1f')](function(){const _0x29f13e=_0x1844cc;logger[_0x29f13e('0x7')](_0x29f13e('0x14'),_0x1e6232,_0x55def8[_0x29f13e('0x2')](','),_0x456878[_0x29f13e('0x12')],_0x456878[_0x29f13e('0x9')]);})[_0x1844cc('0x4')](function(_0x44c7ca){logger['info'](JSON['stringify'](_0x44c7ca));});});},Migration[_0x4210b9('0x19')][_0x4210b9('0x1a')]=function(_0x2ed4ed,_0x38414e){const _0xf6233d=_0x4210b9,_0x12442e=this;this[_0xf6233d('0x1b')]['enqueue'](function(){const _0x230283=_0xf6233d;return _0x12442e[_0x230283('0x1c')][_0x230283('0x1a')](_0x2ed4ed,_0x38414e)['then'](function(){const _0x225542=_0x230283;logger[_0x225542('0x7')](_0x225542('0x1d'),_0x2ed4ed,_0x38414e);})['catch'](function(_0x582960){const _0x1647a7=_0x230283;logger[_0x1647a7('0x7')](JSON['stringify'](_0x582960));});});},Migration['prototype'][_0x4210b9('0x3')]=function(_0x4d5e3c){const _0x529074=_0x4210b9,_0x46aca9=this;this[_0x529074('0x1b')][_0x529074('0xa')](function(){const _0x35bd72=_0x529074;return _0x46aca9['queryInterface'][_0x35bd72('0x18')][_0x35bd72('0x3')](_0x4d5e3c)[_0x35bd72('0x1f')](function(){const _0x42b01f=_0x35bd72;logger[_0x42b01f('0x7')](_0x42b01f('0xd'),_0x4d5e3c);})[_0x35bd72('0x4')](function(_0x54a58b){const _0x43292e=_0x35bd72;logger[_0x43292e('0x7')](JSON[_0x43292e('0x16')](_0x54a58b));});});},Migration[_0x4210b9('0x19')]['removeColumn']=function(_0x3298a1,_0x3de6e1){const _0x396b85=_0x4210b9,_0x2f3432=this;this[_0x396b85('0x1b')]['enqueue'](function(){const _0x1ce57d=_0x396b85;return _0x2f3432[_0x1ce57d('0x1c')][_0x1ce57d('0x8')](_0x3298a1,_0x3de6e1)['then'](function(){const _0x532a7e=_0x1ce57d;logger[_0x532a7e('0x7')]('Removed\x20column\x20%s\x20from\x20%s',_0x3de6e1,_0x3298a1);})[_0x1ce57d('0x4')](function(_0x5b0d7b){const _0x281cfa=_0x1ce57d;logger[_0x281cfa('0x7')](util[_0x281cfa('0x17')](_0x5b0d7b,{'showHidden':![],'depth':null}));});});},Migration[_0x4210b9('0x19')][_0x4210b9('0x1')]=function(_0x11140b,_0x4d7a1c,_0x33687e){const _0x5360eb=_0x4210b9,_0x339cbc=this;this[_0x5360eb('0x1b')][_0x5360eb('0xa')](function(){const _0x188b6a=_0x5360eb;return _0x339cbc['queryInterface']['renameColumn'](_0x11140b,_0x4d7a1c,_0x33687e)[_0x188b6a('0x1f')](function(){const _0xeeea94=_0x188b6a;logger[_0xeeea94('0x7')](_0xeeea94('0x1e'),_0x4d7a1c,_0x33687e,_0x11140b);})[_0x188b6a('0x4')](function(_0x59951f){logger['info'](util['inspect'](_0x59951f,{'showHidden':![],'depth':null}));});});},Migration[_0x4210b9('0x19')]['final']=function(_0x53f718){const _0x5608f8=_0x4210b9;this[_0x5608f8('0x1b')][_0x5608f8('0xa')](function(){return _0x53f718();});},module[_0x4210b9('0x6')]={'up':function(_0x1a8646){return new Promise(function(_0x39887f){const _0x4da681=a1005_0x2166,_0x5771e5=new Migration(_0x1a8646);_0x5771e5[_0x4da681('0x15')](_0x39887f);});},'down':function(){}};