Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.72.js
1 'use strict';const a1123_0x4ec5=['join','catch','prototype','76747JDkylx','uniqueid','leaveAt','42OnLyXK','dropTable','table\x20dropped\x20%s','DELETE\x20FROM\x20user_has_voice_queues_rt\x20WHERE\x20UserId\x20NOT\x20IN\x20(SELECT\x20id\x20FROM\x20users\x20WHERE\x20role\x20=\x20\x27agent\x27)','319244kDNSSi','2nIgOpG','725xMOrzK','query','sequelize','@config/logger','addIndex\x20%s\x20%s\x20%s','info','1oRQYBc','removeIndex','inspect','removeColumn','renameColumn','433853bNQYlc','2203QNiXss','changeColumn','1DQPPxf','1465717bKXqpF','addIndex','179cFAaDU','project_name','enqueue','stringify','query\x20%s','tail','then','sequence','final','exports','queryInterface','Removed\x20column\x20%s\x20from\x20%s','773498yInzqu','removeIndex\x20%s\x20%s','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','util'];const a1123_0x1a18=function(_0x18606b,_0x5153d3){_0x18606b=_0x18606b-0x13c;let _0x4ec5d1=a1123_0x4ec5[_0x18606b];return _0x4ec5d1;};const a1123_0x199a3f=a1123_0x1a18;(function(_0x3d14d4,_0x4e21cc){const _0x4f8c88=a1123_0x1a18;while(!![]){try{const _0x1b1910=-parseInt(_0x4f8c88(0x15c))*parseInt(_0x4f8c88(0x14b))+-parseInt(_0x4f8c88(0x142))*parseInt(_0x4f8c88(0x14a))+parseInt(_0x4f8c88(0x145))*parseInt(_0x4f8c88(0x157))+parseInt(_0x4f8c88(0x149))*parseInt(_0x4f8c88(0x159))+-parseInt(_0x4f8c88(0x151))*parseInt(_0x4f8c88(0x156))+-parseInt(_0x4f8c88(0x168))+parseInt(_0x4f8c88(0x15a));if(_0x1b1910===_0x4e21cc)break;else _0x3d14d4['push'](_0x3d14d4['shift']());}catch(_0xb3f85f){_0x3d14d4['push'](_0x3d14d4['shift']());}}}(a1123_0x4ec5,0x5e733));const util=require(a1123_0x199a3f(0x13e)),logger=require(a1123_0x199a3f(0x14e))('migration'),Sequence=function(){};Sequence[a1123_0x199a3f(0x141)][a1123_0x199a3f(0x15e)]=function(_0x4ca88e){const _0x21d687=a1123_0x199a3f;this['tail']=this[_0x21d687(0x161)]?this['tail']['finally'](_0x4ca88e):_0x4ca88e();};const Migration=function(_0x1bc87d){const _0x40a59d=a1123_0x199a3f;this['queryInterface']=_0x1bc87d,this[_0x40a59d(0x163)]=new Sequence();};Migration[a1123_0x199a3f(0x141)]['changeColumn']=function(_0xaf4679,_0x5f8d37,_0x11c1db){const _0x5739b8=this;this['sequence']['enqueue'](function(){const _0x20077f=a1123_0x1a18;return _0x5739b8[_0x20077f(0x166)][_0x20077f(0x158)](_0xaf4679,_0x5f8d37,_0x11c1db)['then'](function(){const _0x8327c5=_0x20077f;logger[_0x8327c5(0x150)]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x5f8d37,_0xaf4679);})[_0x20077f(0x140)](function(_0x348d55){const _0x2109b3=_0x20077f;logger[_0x2109b3(0x150)](JSON[_0x2109b3(0x15f)](_0x348d55));});});},Migration[a1123_0x199a3f(0x141)]['addColumn']=function(_0x5e9768,_0x53a081,_0x2b6028){const _0x9a3ef1=a1123_0x199a3f,_0x335060=this;this[_0x9a3ef1(0x163)][_0x9a3ef1(0x15e)](function(){const _0x10865d=_0x9a3ef1;return _0x335060[_0x10865d(0x166)]['addColumn'](_0x5e9768,_0x53a081,_0x2b6028)[_0x10865d(0x162)](function(){const _0xf813b6=_0x10865d;logger[_0xf813b6(0x150)]('Added\x20column\x20%s\x20to\x20%s',_0x53a081,_0x5e9768);})[_0x10865d(0x140)](function(_0x1e1684){const _0x160bd2=_0x10865d;logger[_0x160bd2(0x150)](JSON['stringify'](_0x1e1684));});});},Migration[a1123_0x199a3f(0x141)][a1123_0x199a3f(0x146)]=function(_0x157774){const _0x1985d3=a1123_0x199a3f,_0x525606=this;this[_0x1985d3(0x163)][_0x1985d3(0x15e)](function(){const _0x212620=_0x1985d3;return _0x525606['queryInterface'][_0x212620(0x146)](_0x157774,{'force':!![]})[_0x212620(0x162)](function(){const _0x115ce1=_0x212620;logger[_0x115ce1(0x150)](_0x115ce1(0x147),_0x157774);})[_0x212620(0x140)](function(_0x6e957c){const _0x2ec0a0=_0x212620;logger[_0x2ec0a0(0x150)](JSON[_0x2ec0a0(0x15f)](_0x6e957c));});});},Migration[a1123_0x199a3f(0x141)]['addIndex']=function(_0x36eae1,_0x4f9726,_0x239f68){const _0x363e6e=a1123_0x199a3f,_0x1cc918=this;this[_0x363e6e(0x163)][_0x363e6e(0x15e)](function(){const _0x6356b=_0x363e6e;return _0x1cc918[_0x6356b(0x166)][_0x6356b(0x15b)](_0x36eae1,_0x4f9726,{'indexName':_0x239f68})[_0x6356b(0x162)](function(){const _0xd2dd03=_0x6356b;logger[_0xd2dd03(0x150)](_0xd2dd03(0x14f),_0x36eae1,_0x4f9726[_0xd2dd03(0x13f)](','),_0x239f68);})[_0x6356b(0x140)](function(_0x97afc6){const _0xd04b3=_0x6356b;logger[_0xd04b3(0x150)](JSON[_0xd04b3(0x15f)](_0x97afc6));});});},Migration[a1123_0x199a3f(0x141)][a1123_0x199a3f(0x152)]=function(_0x37cf83,_0x370bc1){const _0x3d0740=a1123_0x199a3f,_0x1ff5e9=this;this[_0x3d0740(0x163)][_0x3d0740(0x15e)](function(){const _0x581d54=_0x3d0740;return _0x1ff5e9[_0x581d54(0x166)][_0x581d54(0x152)](_0x37cf83,_0x370bc1)[_0x581d54(0x162)](function(){const _0xfcc3fc=_0x581d54;logger[_0xfcc3fc(0x150)](_0xfcc3fc(0x13c),_0x37cf83,_0x370bc1);})[_0x581d54(0x140)](function(_0x2c65c8){const _0xfa8450=_0x581d54;logger[_0xfa8450(0x150)](JSON[_0xfa8450(0x15f)](_0x2c65c8));});});},Migration[a1123_0x199a3f(0x141)]['query']=function(_0x4e924d){const _0x4da8e3=a1123_0x199a3f,_0x593e3b=this;this[_0x4da8e3(0x163)][_0x4da8e3(0x15e)](function(){const _0xbe45c5=_0x4da8e3;return _0x593e3b['queryInterface'][_0xbe45c5(0x14d)]['query'](_0x4e924d)[_0xbe45c5(0x162)](function(){const _0x165915=_0xbe45c5;logger[_0x165915(0x150)](_0x165915(0x160),_0x4e924d);})['catch'](function(_0x2bbed8){const _0x4309e4=_0xbe45c5;logger[_0x4309e4(0x150)](JSON[_0x4309e4(0x15f)](_0x2bbed8));});});},Migration['prototype'][a1123_0x199a3f(0x154)]=function(_0x277ce2,_0x30e2ae){const _0x37eb3d=a1123_0x199a3f,_0x4f9c16=this;this[_0x37eb3d(0x163)]['enqueue'](function(){const _0x447de0=_0x37eb3d;return _0x4f9c16[_0x447de0(0x166)][_0x447de0(0x154)](_0x277ce2,_0x30e2ae)[_0x447de0(0x162)](function(){const _0x3959ef=_0x447de0;logger[_0x3959ef(0x150)](_0x3959ef(0x167),_0x30e2ae,_0x277ce2);})[_0x447de0(0x140)](function(_0x19a9c7){const _0x334fc0=_0x447de0;logger[_0x334fc0(0x150)](util['inspect'](_0x19a9c7,{'showHidden':![],'depth':null}));});});},Migration[a1123_0x199a3f(0x141)][a1123_0x199a3f(0x155)]=function(_0x2c0c18,_0x3a0764,_0x9d95fc){const _0x525121=a1123_0x199a3f,_0x2abb70=this;this[_0x525121(0x163)][_0x525121(0x15e)](function(){const _0x522388=_0x525121;return _0x2abb70['queryInterface'][_0x522388(0x155)](_0x2c0c18,_0x3a0764,_0x9d95fc)['then'](function(){const _0x43e28e=_0x522388;logger[_0x43e28e(0x150)](_0x43e28e(0x13d),_0x3a0764,_0x9d95fc,_0x2c0c18);})[_0x522388(0x140)](function(_0x17e1cf){const _0x21aad9=_0x522388;logger['info'](util[_0x21aad9(0x153)](_0x17e1cf,{'showHidden':![],'depth':null}));});});},Migration[a1123_0x199a3f(0x141)][a1123_0x199a3f(0x164)]=function(_0x3c500b){const _0xbee627=a1123_0x199a3f;this[_0xbee627(0x163)][_0xbee627(0x15e)](function(){return _0x3c500b();});},module[a1123_0x199a3f(0x165)]={'up':function(_0x2dab93){return new Promise(function(_0x431160){const _0x72b185=a1123_0x1a18,_0x5b5284=new Migration(_0x2dab93);_0x5b5284[_0x72b185(0x14c)](_0x72b185(0x148)),_0x5b5284[_0x72b185(0x15b)]('report_square',[_0x72b185(0x143),_0x72b185(0x15d)],'uid_pname'),_0x5b5284['addIndex']('report_square',[_0x72b185(0x144)],'leaveAt'),_0x5b5284[_0x72b185(0x164)](_0x431160);});},'down':function(){return Promise['resolve']();}};