Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.57.js
1 'use strict';const a1108_0x40a9=['936855rQleNR','380627QoSiLE','query\x20%s','addIndex\x20%s\x20%s\x20%s','hideWhenOffline','resolve','@config/logger','1960827bicTza','59525oROvGh','2tBgJZw','addColumn','chat_websites','prototype','UPDATE\x20report_queue\x20SET\x20lastAssignedTo=NULL\x20\x20WHERE\x20lastAssignedTo=\x22\x22','BOOLEAN','addIndex','renameColumn','util','info','Added\x20column\x20%s\x20to\x20%s','inspect','voice_queues','26408uUVvwy','Changed\x20column\x20%s\x20in\x20table\x20%s','queryInterface','periodic_announce','243956rdLvqi','enqueue','380860oQsMyl','then','Removed\x20column\x20%s\x20from\x20%s','changeColumn','sequence','29yydlij','final','removeColumn','UPDATE\x20users\x20SET\x20permissions=\x27101,102,103,110,104,105,106,107,108,109,100,111\x27\x20WHERE\x20permissions=\x27101,102,103,110,104,105,106,107,108,109,100\x27','finally','tail','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','stringify','sequelize','dropTable','catch','query'];const a1108_0x55e7=function(_0x29ee40,_0x306a56){_0x29ee40=_0x29ee40-0x18a;let _0x40a9cd=a1108_0x40a9[_0x29ee40];return _0x40a9cd;};const a1108_0xb1f637=a1108_0x55e7;(function(_0x67c602,_0x1848c2){const _0x5282f3=a1108_0x55e7;while(!![]){try{const _0x1f1c7e=parseInt(_0x5282f3(0x1a5))*parseInt(_0x5282f3(0x19a))+parseInt(_0x5282f3(0x1b2))*parseInt(_0x5282f3(0x18d))+parseInt(_0x5282f3(0x18c))+-parseInt(_0x5282f3(0x19e))+parseInt(_0x5282f3(0x1a0))+parseInt(_0x5282f3(0x1b1))+-parseInt(_0x5282f3(0x18b));if(_0x1f1c7e===_0x1848c2)break;else _0x67c602['push'](_0x67c602['shift']());}catch(_0x3e2fb5){_0x67c602['push'](_0x67c602['shift']());}}}(a1108_0x40a9,0xaac97));const util=require(a1108_0xb1f637(0x195)),logger=require(a1108_0xb1f637(0x18a))('migration'),Sequence=function(){};Sequence['prototype'][a1108_0xb1f637(0x19f)]=function(_0x1698fc){const _0x39538f=a1108_0xb1f637;this['tail']=this[_0x39538f(0x1aa)]?this[_0x39538f(0x1aa)][_0x39538f(0x1a9)](_0x1698fc):_0x1698fc();};const Migration=function(_0x4b8e15){const _0x281591=a1108_0xb1f637;this[_0x281591(0x19c)]=_0x4b8e15,this['sequence']=new Sequence();};Migration[a1108_0xb1f637(0x190)][a1108_0xb1f637(0x1a3)]=function(_0x3942fa,_0x3561eb,_0x190de0){const _0x31dc85=a1108_0xb1f637,_0x4fcd29=this;this['sequence'][_0x31dc85(0x19f)](function(){const _0x459231=_0x31dc85;return _0x4fcd29['queryInterface'][_0x459231(0x1a3)](_0x3942fa,_0x3561eb,_0x190de0)['then'](function(){const _0xd57746=_0x459231;logger[_0xd57746(0x196)](_0xd57746(0x19b),_0x3561eb,_0x3942fa);})[_0x459231(0x1af)](function(_0x6b293d){const _0x29b6e5=_0x459231;logger[_0x29b6e5(0x196)](JSON['stringify'](_0x6b293d));});});},Migration[a1108_0xb1f637(0x190)][a1108_0xb1f637(0x18e)]=function(_0x454646,_0x5f211e,_0x2b4617){const _0x150818=a1108_0xb1f637,_0x353b28=this;this[_0x150818(0x1a4)][_0x150818(0x19f)](function(){const _0x43bb46=_0x150818;return _0x353b28[_0x43bb46(0x19c)][_0x43bb46(0x18e)](_0x454646,_0x5f211e,_0x2b4617)['then'](function(){const _0x6632f1=_0x43bb46;logger[_0x6632f1(0x196)](_0x6632f1(0x197),_0x5f211e,_0x454646);})[_0x43bb46(0x1af)](function(_0x49caae){const _0x1d8068=_0x43bb46;logger[_0x1d8068(0x196)](JSON['stringify'](_0x49caae));});});},Migration[a1108_0xb1f637(0x190)]['dropTable']=function(_0x37e7d5){const _0x1f7fdb=a1108_0xb1f637,_0x4f3ca9=this;this[_0x1f7fdb(0x1a4)]['enqueue'](function(){const _0x3ff062=_0x1f7fdb;return _0x4f3ca9[_0x3ff062(0x19c)][_0x3ff062(0x1ae)](_0x37e7d5,{'force':!![]})['then'](function(){const _0x5dbc00=_0x3ff062;logger[_0x5dbc00(0x196)]('table\x20dropped\x20%s',_0x37e7d5);})['catch'](function(_0x58d26d){const _0x3547f0=_0x3ff062;logger[_0x3547f0(0x196)](JSON['stringify'](_0x58d26d));});});},Migration[a1108_0xb1f637(0x190)]['addIndex']=function(_0x3c1a04,_0x326fd0,_0x474e63){const _0x4bee26=a1108_0xb1f637,_0x313444=this;this[_0x4bee26(0x1a4)]['enqueue'](function(){const _0x328c6a=_0x4bee26;return _0x313444[_0x328c6a(0x19c)][_0x328c6a(0x193)](_0x3c1a04,_0x326fd0,{'indexName':_0x474e63})[_0x328c6a(0x1a1)](function(){const _0x317028=_0x328c6a;logger[_0x317028(0x196)](_0x317028(0x1b4),_0x3c1a04,_0x326fd0['join'](','),_0x474e63);})[_0x328c6a(0x1af)](function(_0x374d94){const _0x1d2db0=_0x328c6a;logger['info'](JSON[_0x1d2db0(0x1ac)](_0x374d94));});});},Migration[a1108_0xb1f637(0x190)][a1108_0xb1f637(0x1b0)]=function(_0x4a2214){const _0x378ea4=a1108_0xb1f637,_0x164846=this;this[_0x378ea4(0x1a4)][_0x378ea4(0x19f)](function(){const _0x23872a=_0x378ea4;return _0x164846[_0x23872a(0x19c)][_0x23872a(0x1ad)][_0x23872a(0x1b0)](_0x4a2214)[_0x23872a(0x1a1)](function(){const _0x321c17=_0x23872a;logger[_0x321c17(0x196)](_0x321c17(0x1b3),_0x4a2214);})[_0x23872a(0x1af)](function(_0x10ec6b){const _0xfcbb96=_0x23872a;logger[_0xfcbb96(0x196)](JSON[_0xfcbb96(0x1ac)](_0x10ec6b));});});},Migration[a1108_0xb1f637(0x190)][a1108_0xb1f637(0x1a7)]=function(_0x17c282,_0x194d23){const _0x82882b=a1108_0xb1f637,_0x15a3de=this;this[_0x82882b(0x1a4)][_0x82882b(0x19f)](function(){const _0x184925=_0x82882b;return _0x15a3de['queryInterface'][_0x184925(0x1a7)](_0x17c282,_0x194d23)[_0x184925(0x1a1)](function(){const _0x304a23=_0x184925;logger[_0x304a23(0x196)](_0x304a23(0x1a2),_0x194d23,_0x17c282);})[_0x184925(0x1af)](function(_0x42af4f){const _0x2b49e5=_0x184925;logger[_0x2b49e5(0x196)](util[_0x2b49e5(0x198)](_0x42af4f,{'showHidden':![],'depth':null}));});});},Migration[a1108_0xb1f637(0x190)]['renameColumn']=function(_0x178074,_0x399b34,_0x59508c){const _0xed69ef=a1108_0xb1f637,_0x582a2d=this;this[_0xed69ef(0x1a4)][_0xed69ef(0x19f)](function(){const _0x42a637=_0xed69ef;return _0x582a2d['queryInterface'][_0x42a637(0x194)](_0x178074,_0x399b34,_0x59508c)['then'](function(){const _0x4d9f79=_0x42a637;logger[_0x4d9f79(0x196)](_0x4d9f79(0x1ab),_0x399b34,_0x59508c,_0x178074);})[_0x42a637(0x1af)](function(_0x3697a8){logger['info'](util['inspect'](_0x3697a8,{'showHidden':![],'depth':null}));});});},Migration[a1108_0xb1f637(0x190)][a1108_0xb1f637(0x1a6)]=function(_0x5cd2bf){const _0x257f54=a1108_0xb1f637;this['sequence'][_0x257f54(0x19f)](function(){return _0x5cd2bf();});},module['exports']={'up':function(_0x451fd2,_0x1b8210){return new Promise(function(_0x11ad9c){const _0x10d832=a1108_0x55e7,_0x9e2b39=new Migration(_0x451fd2);_0x9e2b39[_0x10d832(0x18e)](_0x10d832(0x18f),_0x10d832(0x1b5),{'type':_0x1b8210[_0x10d832(0x192)],'defaultValue':![]}),_0x9e2b39[_0x10d832(0x1a3)](_0x10d832(0x199),_0x10d832(0x19d),{'type':_0x1b8210['TEXT']}),_0x9e2b39[_0x10d832(0x1b0)](_0x10d832(0x1a8)),_0x9e2b39[_0x10d832(0x1b0)](_0x10d832(0x191)),_0x9e2b39[_0x10d832(0x1a6)](_0x11ad9c);});},'down':function(){const _0x4aacac=a1108_0xb1f637;return Promise[_0x4aacac(0x1b6)]();}};