Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / migrations / 2.4.15.js
1 const a998_0x2958=['Changed\x20column\x20%s\x20in\x20table\x20%s','Added\x20column\x20%s\x20to\x20%s','sequence','indicesType','dropTable','removeColumn','then','query\x20%s','info','addColumn','join','final','changeColumn','exports','finally','tail','Removed\x20column\x20%s\x20from\x20%s','prototype','queryInterface','catch','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','table\x20dropped\x20%s','migration','sequelize','renameColumn','enqueue','addIndex','inspect','stringify','indexName'];(function(_0x4c87b8,_0x29585e){const _0x30f4ed=function(_0x5d0c64){while(--_0x5d0c64){_0x4c87b8['push'](_0x4c87b8['shift']());}};_0x30f4ed(++_0x29585e);}(a998_0x2958,0x13c));const a998_0x30f4=function(_0x4c87b8,_0x29585e){_0x4c87b8=_0x4c87b8-0x0;let _0x30f4ed=a998_0x2958[_0x4c87b8];return _0x30f4ed;};const _0x1d74b2=a998_0x30f4;'use strict';const util=require('util'),logger=require('../config/logger')(_0x1d74b2('0x6')),Sequence=function(){};Sequence[_0x1d74b2('0x1')][_0x1d74b2('0x9')]=function(_0x5d0c64){const _0x1b711e=_0x1d74b2;this[_0x1b711e('0x1d')]=this[_0x1b711e('0x1d')]?this[_0x1b711e('0x1d')][_0x1b711e('0x1c')](_0x5d0c64):_0x5d0c64();};const Migration=function(_0x3b5561){const _0x182e11=_0x1d74b2;this[_0x182e11('0x2')]=_0x3b5561,this[_0x182e11('0x10')]=new Sequence();};Migration['prototype'][_0x1d74b2('0x1a')]=function(_0x4c4a58,_0x50021,_0x992f3){const _0x1b427b=_0x1d74b2,_0x17b3f4=this;this[_0x1b427b('0x10')][_0x1b427b('0x9')](function(){const _0x5dc947=_0x1b427b;return _0x17b3f4['queryInterface']['changeColumn'](_0x4c4a58,_0x50021,_0x992f3)[_0x5dc947('0x14')](function(){const _0x1ff273=_0x5dc947;logger[_0x1ff273('0x16')](_0x1ff273('0xe'),_0x50021,_0x4c4a58);})[_0x5dc947('0x3')](function(_0x35a44e){const _0x31831d=_0x5dc947;logger[_0x31831d('0x16')](JSON[_0x31831d('0xc')](_0x35a44e));});});},Migration['prototype'][_0x1d74b2('0x17')]=function(_0x4e2815,_0x514228,_0xea95fb){const _0x307ae5=_0x1d74b2,_0x44d5b4=this;this[_0x307ae5('0x10')][_0x307ae5('0x9')](function(){const _0x242c68=_0x307ae5;return _0x44d5b4[_0x242c68('0x2')][_0x242c68('0x17')](_0x4e2815,_0x514228,_0xea95fb)[_0x242c68('0x14')](function(){const _0x24b4e0=_0x242c68;logger['info'](_0x24b4e0('0xf'),_0x514228,_0x4e2815);})['catch'](function(_0x5c41f3){const _0x3bfdd5=_0x242c68;logger[_0x3bfdd5('0x16')](JSON[_0x3bfdd5('0xc')](_0x5c41f3));});});},Migration[_0x1d74b2('0x1')][_0x1d74b2('0x12')]=function(_0x291b4a){const _0x4c1be1=_0x1d74b2,_0x2dd245=this;this[_0x4c1be1('0x10')][_0x4c1be1('0x9')](function(){const _0xdda4a2=_0x4c1be1;return _0x2dd245[_0xdda4a2('0x2')][_0xdda4a2('0x12')](_0x291b4a,{'force':!![]})[_0xdda4a2('0x14')](function(){const _0x10b2a2=_0xdda4a2;logger[_0x10b2a2('0x16')](_0x10b2a2('0x5'),_0x291b4a);})[_0xdda4a2('0x3')](function(_0x4e6664){const _0x466cba=_0xdda4a2;logger['info'](JSON[_0x466cba('0xc')](_0x4e6664));});});},Migration[_0x1d74b2('0x1')][_0x1d74b2('0xa')]=function(_0x543d93,_0x4581f4,_0x32dce0){const _0x3776de=_0x1d74b2,_0x3f8d67=this;this[_0x3776de('0x10')][_0x3776de('0x9')](function(){const _0x272b8e=_0x3776de;return _0x3f8d67['queryInterface'][_0x272b8e('0xa')](_0x543d93,_0x4581f4,{'indexName':_0x32dce0[_0x272b8e('0xd')],'indicesType':_0x32dce0[_0x272b8e('0x11')]})[_0x272b8e('0x14')](function(){const _0x3c5094=_0x272b8e;logger['info']('addIndex\x20%s\x20%s\x20%s\x20[%s]',_0x543d93,_0x4581f4[_0x3c5094('0x18')](','),_0x32dce0[_0x3c5094('0xd')],_0x32dce0[_0x3c5094('0x11')]);})[_0x272b8e('0x3')](function(_0x46bbba){const _0x26ccf2=_0x272b8e;logger[_0x26ccf2('0x16')](JSON[_0x26ccf2('0xc')](_0x46bbba));});});},Migration[_0x1d74b2('0x1')]['removeIndex']=function(_0x564741,_0x1fbd6b){const _0x48590c=_0x1d74b2,_0x131a4d=this;this[_0x48590c('0x10')]['enqueue'](function(){const _0x3a67d0=_0x48590c;return _0x131a4d[_0x3a67d0('0x2')]['removeIndex'](_0x564741,_0x1fbd6b)[_0x3a67d0('0x14')](function(){const _0x3c820c=_0x3a67d0;logger[_0x3c820c('0x16')]('removeIndex\x20%s\x20%s',_0x564741,_0x1fbd6b);})['catch'](function(_0x2e21ed){const _0x593efa=_0x3a67d0;logger[_0x593efa('0x16')](JSON[_0x593efa('0xc')](_0x2e21ed));});});},Migration[_0x1d74b2('0x1')]['query']=function(_0xbd684){const _0x1982a3=_0x1d74b2,_0x5e4891=this;this[_0x1982a3('0x10')][_0x1982a3('0x9')](function(){const _0x44052c=_0x1982a3;return _0x5e4891['queryInterface'][_0x44052c('0x7')]['query'](_0xbd684)[_0x44052c('0x14')](function(){const _0x821b5a=_0x44052c;logger[_0x821b5a('0x16')](_0x821b5a('0x15'),_0xbd684);})[_0x44052c('0x3')](function(_0x538e7f){const _0x55cde7=_0x44052c;logger[_0x55cde7('0x16')](JSON[_0x55cde7('0xc')](_0x538e7f));});});},Migration[_0x1d74b2('0x1')][_0x1d74b2('0x13')]=function(_0x11fc15,_0x2398e4){const _0x42e6db=_0x1d74b2,_0x2b00a0=this;this[_0x42e6db('0x10')][_0x42e6db('0x9')](function(){const _0x2d8fe3=_0x42e6db;return _0x2b00a0[_0x2d8fe3('0x2')]['removeColumn'](_0x11fc15,_0x2398e4)['then'](function(){const _0x1ae942=_0x2d8fe3;logger[_0x1ae942('0x16')](_0x1ae942('0x0'),_0x2398e4,_0x11fc15);})['catch'](function(_0x2e01bf){const _0x46d2e0=_0x2d8fe3;logger['info'](util[_0x46d2e0('0xb')](_0x2e01bf,{'showHidden':![],'depth':null}));});});},Migration[_0x1d74b2('0x1')][_0x1d74b2('0x8')]=function(_0x1bce94,_0x88c6e5,_0x59cb66){const _0x835b57=_0x1d74b2,_0x3c529d=this;this['sequence'][_0x835b57('0x9')](function(){const _0x2f01e2=_0x835b57;return _0x3c529d['queryInterface'][_0x2f01e2('0x8')](_0x1bce94,_0x88c6e5,_0x59cb66)[_0x2f01e2('0x14')](function(){const _0x312a3a=_0x2f01e2;logger[_0x312a3a('0x16')](_0x312a3a('0x4'),_0x88c6e5,_0x59cb66,_0x1bce94);})[_0x2f01e2('0x3')](function(_0x416b32){const _0x79c06d=_0x2f01e2;logger[_0x79c06d('0x16')](util[_0x79c06d('0xb')](_0x416b32,{'showHidden':![],'depth':null}));});});},Migration[_0x1d74b2('0x1')][_0x1d74b2('0x19')]=function(_0x95dce3){this['sequence']['enqueue'](function(){return _0x95dce3();});},module[_0x1d74b2('0x1b')]={'up':function(_0x51739a){return new Promise(function(_0x43408f){const _0x7e9f77=a998_0x30f4,_0x244437=new Migration(_0x51739a);_0x244437['query']('UPDATE\x20sms_accounts\x20SET\x20baseUrl\x20=\x20\x22https://sms.csc.lv\x22\x20WHERE\x20type\x20=\x20\x22csc\x22'),_0x244437[_0x7e9f77('0x19')](_0x43408f);});},'down':function(){}};