7a42c7021d6d8f396aadd04e24875be855515e79
[motion-next.git] / server / migrations / 2.4.21.js
1 const a1005_0x232b=['addIndex\x20%s\x20%s\x20%s\x20[%s]','exports','Removed\x20column\x20%s\x20from\x20%s','join','renameColumn','enqueue','info','dropTable','util','inspect','tail','prototype','Added\x20column\x20%s\x20to\x20%s','sequence','final','finally','changeColumn','addIndex','query','addColumn','indexName','queryInterface','Changed\x20column\x20%s\x20in\x20table\x20%s','catch','sequelize','removeColumn','removeIndex','query\x20%s','then','indicesType','stringify','migration'];(function(_0x3abbfc,_0x232b01){const _0x1dfa1b=function(_0x5c7bba){while(--_0x5c7bba){_0x3abbfc['push'](_0x3abbfc['shift']());}};_0x1dfa1b(++_0x232b01);}(a1005_0x232b,0x1bf));const a1005_0x1dfa=function(_0x3abbfc,_0x232b01){_0x3abbfc=_0x3abbfc-0x0;let _0x1dfa1b=a1005_0x232b[_0x3abbfc];return _0x1dfa1b;};const _0x522708=a1005_0x1dfa;'use strict';const util=require(_0x522708('0x9')),logger=require('../config/logger')(_0x522708('0x0')),Sequence=function(){};Sequence[_0x522708('0xc')]['enqueue']=function(_0x5c7bba){const _0x425d86=_0x522708;this[_0x425d86('0xb')]=this[_0x425d86('0xb')]?this[_0x425d86('0xb')][_0x425d86('0x10')](_0x5c7bba):_0x5c7bba();};const Migration=function(_0x598183){const _0x192d5e=_0x522708;this[_0x192d5e('0x16')]=_0x598183,this[_0x192d5e('0xe')]=new Sequence();};Migration[_0x522708('0xc')]['changeColumn']=function(_0x60c0ff,_0x2ba1d6,_0x1cc829){const _0x5ec5a5=_0x522708,_0x4db017=this;this[_0x5ec5a5('0xe')][_0x5ec5a5('0x6')](function(){const _0x351616=_0x5ec5a5;return _0x4db017[_0x351616('0x16')][_0x351616('0x11')](_0x60c0ff,_0x2ba1d6,_0x1cc829)['then'](function(){const _0x184112=_0x351616;logger[_0x184112('0x7')](_0x184112('0x17'),_0x2ba1d6,_0x60c0ff);})[_0x351616('0x18')](function(_0x36280c){const _0x2be07d=_0x351616;logger[_0x2be07d('0x7')](JSON[_0x2be07d('0x1f')](_0x36280c));});});},Migration['prototype'][_0x522708('0x14')]=function(_0xef77a7,_0x33d4e4,_0x425979){const _0x2c4caf=_0x522708,_0x38bce0=this;this[_0x2c4caf('0xe')][_0x2c4caf('0x6')](function(){const _0x3edba2=_0x2c4caf;return _0x38bce0['queryInterface'][_0x3edba2('0x14')](_0xef77a7,_0x33d4e4,_0x425979)[_0x3edba2('0x1d')](function(){const _0x117a01=_0x3edba2;logger[_0x117a01('0x7')](_0x117a01('0xd'),_0x33d4e4,_0xef77a7);})[_0x3edba2('0x18')](function(_0x31087c){const _0x1b2fea=_0x3edba2;logger[_0x1b2fea('0x7')](JSON[_0x1b2fea('0x1f')](_0x31087c));});});},Migration[_0x522708('0xc')][_0x522708('0x8')]=function(_0x15d1eb){const _0x2cec02=_0x522708,_0x475059=this;this[_0x2cec02('0xe')][_0x2cec02('0x6')](function(){const _0x2d62b5=_0x2cec02;return _0x475059[_0x2d62b5('0x16')]['dropTable'](_0x15d1eb,{'force':!![]})['then'](function(){const _0x2df332=_0x2d62b5;logger[_0x2df332('0x7')]('table\x20dropped\x20%s',_0x15d1eb);})[_0x2d62b5('0x18')](function(_0x37104c){const _0x38a239=_0x2d62b5;logger[_0x38a239('0x7')](JSON[_0x38a239('0x1f')](_0x37104c));});});},Migration['prototype'][_0x522708('0x12')]=function(_0x25318a,_0x17dc23,_0x522508){const _0x26a3e3=_0x522708,_0x155228=this;this[_0x26a3e3('0xe')]['enqueue'](function(){const _0x5c752a=_0x26a3e3;return _0x155228[_0x5c752a('0x16')][_0x5c752a('0x12')](_0x25318a,_0x17dc23,{'indexName':_0x522508[_0x5c752a('0x15')],'indicesType':_0x522508['indicesType']})['then'](function(){const _0x585ab8=_0x5c752a;logger[_0x585ab8('0x7')](_0x585ab8('0x1'),_0x25318a,_0x17dc23[_0x585ab8('0x4')](','),_0x522508['indexName'],_0x522508[_0x585ab8('0x1e')]);})[_0x5c752a('0x18')](function(_0x36e634){const _0x3354bd=_0x5c752a;logger[_0x3354bd('0x7')](JSON[_0x3354bd('0x1f')](_0x36e634));});});},Migration[_0x522708('0xc')][_0x522708('0x1b')]=function(_0x4e2144,_0x450f87){const _0x73cf3d=_0x522708,_0x569528=this;this[_0x73cf3d('0xe')][_0x73cf3d('0x6')](function(){const _0x546e03=_0x73cf3d;return _0x569528[_0x546e03('0x16')][_0x546e03('0x1b')](_0x4e2144,_0x450f87)[_0x546e03('0x1d')](function(){const _0x12290c=_0x546e03;logger[_0x12290c('0x7')]('removeIndex\x20%s\x20%s',_0x4e2144,_0x450f87);})['catch'](function(_0x32b587){const _0x594adc=_0x546e03;logger['info'](JSON[_0x594adc('0x1f')](_0x32b587));});});},Migration['prototype'][_0x522708('0x13')]=function(_0x1de9db){const _0x2c9619=_0x522708,_0x4bb2af=this;this['sequence'][_0x2c9619('0x6')](function(){const _0x4918cd=_0x2c9619;return _0x4bb2af[_0x4918cd('0x16')][_0x4918cd('0x19')]['query'](_0x1de9db)[_0x4918cd('0x1d')](function(){const _0x15761e=_0x4918cd;logger[_0x15761e('0x7')](_0x15761e('0x1c'),_0x1de9db);})['catch'](function(_0x529fef){logger['info'](JSON['stringify'](_0x529fef));});});},Migration[_0x522708('0xc')][_0x522708('0x1a')]=function(_0x5557ce,_0x19aa17){const _0x1884cb=_0x522708,_0x21370b=this;this[_0x1884cb('0xe')]['enqueue'](function(){const _0x35f844=_0x1884cb;return _0x21370b[_0x35f844('0x16')][_0x35f844('0x1a')](_0x5557ce,_0x19aa17)[_0x35f844('0x1d')](function(){const _0x5ab9e5=_0x35f844;logger[_0x5ab9e5('0x7')](_0x5ab9e5('0x3'),_0x19aa17,_0x5557ce);})[_0x35f844('0x18')](function(_0x5064ee){const _0x2babfd=_0x35f844;logger[_0x2babfd('0x7')](util[_0x2babfd('0xa')](_0x5064ee,{'showHidden':![],'depth':null}));});});},Migration[_0x522708('0xc')][_0x522708('0x5')]=function(_0x2d6e33,_0x50dc71,_0xe1efc5){const _0x4380e7=_0x522708,_0x51415d=this;this[_0x4380e7('0xe')][_0x4380e7('0x6')](function(){const _0x566773=_0x4380e7;return _0x51415d['queryInterface'][_0x566773('0x5')](_0x2d6e33,_0x50dc71,_0xe1efc5)['then'](function(){const _0x122068=_0x566773;logger[_0x122068('0x7')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x50dc71,_0xe1efc5,_0x2d6e33);})[_0x566773('0x18')](function(_0x14afd9){const _0xc9ac1e=_0x566773;logger[_0xc9ac1e('0x7')](util['inspect'](_0x14afd9,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x522708('0xf')]=function(_0x141ddc){const _0x4d201e=_0x522708;this[_0x4d201e('0xe')]['enqueue'](function(){return _0x141ddc();});},module[_0x522708('0x2')]={'up':function(_0x13597c){return new Promise(function(_0x2fd576){const _0x4729ed=a1005_0x1dfa,_0x371d82=new Migration(_0x13597c);_0x371d82[_0x4729ed('0xf')](_0x2fd576);});},'down':function(){}};