4cf65e0705317b723b1cabfcad334fcd25e8abd0
[motion-next.git] / server / migrations / 2.4.11.js
1 const a994_0x4f67=['join','stringify','migration','removeColumn','util','inspect','Changed\x20column\x20%s\x20in\x20table\x20%s','then','changeColumn','catch','table\x20dropped\x20%s','prototype','sequence','addColumn','queryInterface','removeIndex','addIndex','../config/logger','sequelize','dropTable','finally','indicesType','indexName','enqueue','info','addIndex\x20%s\x20%s\x20%s\x20[%s]','query\x20%s','query','tail','Removed\x20column\x20%s\x20from\x20%s'];(function(_0xca2e2c,_0x4f67f4){const _0x455dd2=function(_0x5dfdda){while(--_0x5dfdda){_0xca2e2c['push'](_0xca2e2c['shift']());}};_0x455dd2(++_0x4f67f4);}(a994_0x4f67,0x1d5));const a994_0x455d=function(_0xca2e2c,_0x4f67f4){_0xca2e2c=_0xca2e2c-0x0;let _0x455dd2=a994_0x4f67[_0xca2e2c];return _0x455dd2;};const _0x4bea2b=a994_0x455d;'use strict';const util=require(_0x4bea2b('0xf')),logger=require(_0x4bea2b('0x1c'))(_0x4bea2b('0xd')),Sequence=function(){};Sequence[_0x4bea2b('0x16')]['enqueue']=function(_0x5dfdda){const _0x346bd9=_0x4bea2b;this[_0x346bd9('0x9')]=this['tail']?this['tail'][_0x346bd9('0x1')](_0x5dfdda):_0x5dfdda();};const Migration=function(_0x1a1d94){const _0x457a0f=_0x4bea2b;this[_0x457a0f('0x19')]=_0x1a1d94,this[_0x457a0f('0x17')]=new Sequence();};Migration[_0x4bea2b('0x16')][_0x4bea2b('0x13')]=function(_0x2bf314,_0xee0027,_0x40d0ea){const _0x195b7d=_0x4bea2b,_0x345ca7=this;this[_0x195b7d('0x17')][_0x195b7d('0x4')](function(){const _0x576ebb=_0x195b7d;return _0x345ca7[_0x576ebb('0x19')]['changeColumn'](_0x2bf314,_0xee0027,_0x40d0ea)[_0x576ebb('0x12')](function(){const _0x5cf60e=_0x576ebb;logger['info'](_0x5cf60e('0x11'),_0xee0027,_0x2bf314);})['catch'](function(_0xdace65){const _0xbe8a38=_0x576ebb;logger[_0xbe8a38('0x5')](JSON[_0xbe8a38('0xc')](_0xdace65));});});},Migration[_0x4bea2b('0x16')][_0x4bea2b('0x18')]=function(_0x1d3bb6,_0x2053e8,_0x2050a7){const _0x281fae=_0x4bea2b,_0x187b8e=this;this[_0x281fae('0x17')][_0x281fae('0x4')](function(){const _0x317fec=_0x281fae;return _0x187b8e['queryInterface'][_0x317fec('0x18')](_0x1d3bb6,_0x2053e8,_0x2050a7)['then'](function(){const _0x50ad8b=_0x317fec;logger[_0x50ad8b('0x5')]('Added\x20column\x20%s\x20to\x20%s',_0x2053e8,_0x1d3bb6);})[_0x317fec('0x14')](function(_0x11dc98){const _0x5901e3=_0x317fec;logger[_0x5901e3('0x5')](JSON[_0x5901e3('0xc')](_0x11dc98));});});},Migration[_0x4bea2b('0x16')][_0x4bea2b('0x0')]=function(_0x1aa9d5){const _0x2f810c=_0x4bea2b,_0x3bb520=this;this[_0x2f810c('0x17')][_0x2f810c('0x4')](function(){const _0xd70dda=_0x2f810c;return _0x3bb520['queryInterface'][_0xd70dda('0x0')](_0x1aa9d5,{'force':!![]})[_0xd70dda('0x12')](function(){const _0x17ffb2=_0xd70dda;logger[_0x17ffb2('0x5')](_0x17ffb2('0x15'),_0x1aa9d5);})[_0xd70dda('0x14')](function(_0x5b024f){logger['info'](JSON['stringify'](_0x5b024f));});});},Migration[_0x4bea2b('0x16')][_0x4bea2b('0x1b')]=function(_0x341e98,_0x5a6f87,_0x5eba9b){const _0x2fb97f=_0x4bea2b,_0x4f9cdc=this;this[_0x2fb97f('0x17')][_0x2fb97f('0x4')](function(){const _0x20104c=_0x2fb97f;return _0x4f9cdc[_0x20104c('0x19')]['addIndex'](_0x341e98,_0x5a6f87,{'indexName':_0x5eba9b[_0x20104c('0x3')],'indicesType':_0x5eba9b[_0x20104c('0x2')]})[_0x20104c('0x12')](function(){const _0x267ff4=_0x20104c;logger[_0x267ff4('0x5')](_0x267ff4('0x6'),_0x341e98,_0x5a6f87[_0x267ff4('0xb')](','),_0x5eba9b['indexName'],_0x5eba9b[_0x267ff4('0x2')]);})['catch'](function(_0x2ecb3d){const _0x52af39=_0x20104c;logger[_0x52af39('0x5')](JSON['stringify'](_0x2ecb3d));});});},Migration[_0x4bea2b('0x16')][_0x4bea2b('0x1a')]=function(_0xd81935,_0x2d0a0a){const _0x4757c5=_0x4bea2b,_0x5cea44=this;this['sequence'][_0x4757c5('0x4')](function(){const _0x59d2ad=_0x4757c5;return _0x5cea44['queryInterface'][_0x59d2ad('0x1a')](_0xd81935,_0x2d0a0a)['then'](function(){logger['info']('removeIndex\x20%s\x20%s',_0xd81935,_0x2d0a0a);})[_0x59d2ad('0x14')](function(_0x1c5a8a){const _0x5465a0=_0x59d2ad;logger[_0x5465a0('0x5')](JSON[_0x5465a0('0xc')](_0x1c5a8a));});});},Migration[_0x4bea2b('0x16')][_0x4bea2b('0x8')]=function(_0x14b52c){const _0x3448f3=this;this['sequence']['enqueue'](function(){const _0x43123f=a994_0x455d;return _0x3448f3['queryInterface'][_0x43123f('0x1d')][_0x43123f('0x8')](_0x14b52c)['then'](function(){const _0x224829=_0x43123f;logger['info'](_0x224829('0x7'),_0x14b52c);})[_0x43123f('0x14')](function(_0x1e0eb3){const _0x290d3c=_0x43123f;logger[_0x290d3c('0x5')](JSON[_0x290d3c('0xc')](_0x1e0eb3));});});},Migration[_0x4bea2b('0x16')][_0x4bea2b('0xe')]=function(_0x58c1d2,_0x112e5e){const _0x5bb2c7=_0x4bea2b,_0x38ad22=this;this[_0x5bb2c7('0x17')][_0x5bb2c7('0x4')](function(){const _0x31d593=_0x5bb2c7;return _0x38ad22[_0x31d593('0x19')][_0x31d593('0xe')](_0x58c1d2,_0x112e5e)[_0x31d593('0x12')](function(){const _0x501a95=_0x31d593;logger['info'](_0x501a95('0xa'),_0x112e5e,_0x58c1d2);})[_0x31d593('0x14')](function(_0x41f87a){const _0x4d3901=_0x31d593;logger[_0x4d3901('0x5')](util[_0x4d3901('0x10')](_0x41f87a,{'showHidden':![],'depth':null}));});});},Migration['prototype']['renameColumn']=function(_0x1fd37e,_0x5dfd2b,_0x2eb731){const _0x4e043a=_0x4bea2b,_0x4c3308=this;this[_0x4e043a('0x17')][_0x4e043a('0x4')](function(){const _0x2ce03e=_0x4e043a;return _0x4c3308['queryInterface']['renameColumn'](_0x1fd37e,_0x5dfd2b,_0x2eb731)[_0x2ce03e('0x12')](function(){logger['info']('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x5dfd2b,_0x2eb731,_0x1fd37e);})[_0x2ce03e('0x14')](function(_0x364189){const _0x56d4fb=_0x2ce03e;logger['info'](util[_0x56d4fb('0x10')](_0x364189,{'showHidden':![],'depth':null}));});});},Migration[_0x4bea2b('0x16')]['final']=function(_0x2c3b8c){const _0x1b4371=_0x4bea2b;this[_0x1b4371('0x17')][_0x1b4371('0x4')](function(){return _0x2c3b8c();});},module['exports']={'up':function(_0x263474){return new Promise(function(_0x1b0ac6){const _0x216314=new Migration(_0x263474);_0x216314['final'](_0x1b0ac6);});},'down':function(){}};