f862989641b50574c6a452728b640557c35f71ff
[motion-next.git] / server / migrations / 2.3.7.js
1 const a980_0xf368=['INTEGER','queryInterface','table\x20dropped\x20%s','FORWARD,\x20BLIND,\x20ATTENDED','../config/logger','info','transfertype','Task','prototype','inspect','STRING','removeColumn','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','query','then','Case','exports','agententerreason','addIndex\x20%s\x20%s\x20%s','ENUM','renameColumn','Changed\x20column\x20%s\x20in\x20table\x20%s','BOOLEAN','sequelize','tail','removeIndex','transferexten','finally','stringify','addColumn','dropTable','report_agent','enqueue','report_call','transfer','catch','migration','sequence','Added\x20column\x20%s\x20to\x20%s','final','join','ticketType','addIndex','changeColumn','Removed\x20column\x20%s\x20from\x20%s','transferuniqueid'];(function(_0x14f5c6,_0xf3682e){const _0x5b6887=function(_0xd8b6c7){while(--_0xd8b6c7){_0x14f5c6['push'](_0x14f5c6['shift']());}};_0x5b6887(++_0xf3682e);}(a980_0xf368,0xcf));const a980_0x5b68=function(_0x14f5c6,_0xf3682e){_0x14f5c6=_0x14f5c6-0x0;let _0x5b6887=a980_0xf368[_0x14f5c6];return _0x5b6887;};const _0x4ff490=a980_0x5b68;'use strict';const util=require('util'),logger=require(_0x4ff490('0x1b'))(_0x4ff490('0xd')),Sequence=function(){};Sequence['prototype'][_0x4ff490('0x9')]=function(_0xd8b6c7){const _0x210d10=_0x4ff490;this[_0x210d10('0x1')]=this[_0x210d10('0x1')]?this[_0x210d10('0x1')][_0x210d10('0x4')](_0xd8b6c7):_0xd8b6c7();};const Migration=function(_0x257a13){const _0x3c59c2=_0x4ff490;this[_0x3c59c2('0x18')]=_0x257a13,this[_0x3c59c2('0xe')]=new Sequence();};Migration['prototype']['changeColumn']=function(_0x35468a,_0x5d3e40,_0x3ba98d){const _0x2b30a2=_0x4ff490,_0x52bc45=this;this[_0x2b30a2('0xe')][_0x2b30a2('0x9')](function(){const _0x1b2d0c=_0x2b30a2;return _0x52bc45[_0x1b2d0c('0x18')][_0x1b2d0c('0x14')](_0x35468a,_0x5d3e40,_0x3ba98d)[_0x1b2d0c('0x25')](function(){const _0x33683e=_0x1b2d0c;logger[_0x33683e('0x1c')](_0x33683e('0x2c'),_0x5d3e40,_0x35468a);})[_0x1b2d0c('0xc')](function(_0x31e1f0){const _0x22b2a9=_0x1b2d0c;logger[_0x22b2a9('0x1c')](JSON['stringify'](_0x31e1f0));});});},Migration['prototype'][_0x4ff490('0x6')]=function(_0x3dd836,_0x403ede,_0x25961a){const _0x43f437=this;this['sequence']['enqueue'](function(){const _0x14a1e8=a980_0x5b68;return _0x43f437[_0x14a1e8('0x18')][_0x14a1e8('0x6')](_0x3dd836,_0x403ede,_0x25961a)[_0x14a1e8('0x25')](function(){const _0x90e8c5=_0x14a1e8;logger[_0x90e8c5('0x1c')](_0x90e8c5('0xf'),_0x403ede,_0x3dd836);})[_0x14a1e8('0xc')](function(_0x8919dc){const _0x4a4a07=_0x14a1e8;logger[_0x4a4a07('0x1c')](JSON['stringify'](_0x8919dc));});});},Migration['prototype'][_0x4ff490('0x7')]=function(_0x3522f3){const _0x35b199=this;this['sequence']['enqueue'](function(){const _0x245515=a980_0x5b68;return _0x35b199['queryInterface'][_0x245515('0x7')](_0x3522f3,{'force':!![]})[_0x245515('0x25')](function(){const _0x17e84b=_0x245515;logger[_0x17e84b('0x1c')](_0x17e84b('0x19'),_0x3522f3);})['catch'](function(_0x5900b9){const _0x570294=_0x245515;logger[_0x570294('0x1c')](JSON[_0x570294('0x5')](_0x5900b9));});});},Migration['prototype'][_0x4ff490('0x13')]=function(_0x303bff,_0xb35ed3,_0x46a08f){const _0x1cbfbb=_0x4ff490,_0x548567=this;this['sequence'][_0x1cbfbb('0x9')](function(){const _0x51111b=_0x1cbfbb;return _0x548567[_0x51111b('0x18')][_0x51111b('0x13')](_0x303bff,_0xb35ed3,{'indexName':_0x46a08f})[_0x51111b('0x25')](function(){const _0x4070f5=_0x51111b;logger[_0x4070f5('0x1c')](_0x4070f5('0x29'),_0x303bff,_0xb35ed3[_0x4070f5('0x11')](','),_0x46a08f);})['catch'](function(_0x2a57d0){const _0x1c7b2a=_0x51111b;logger['info'](JSON[_0x1c7b2a('0x5')](_0x2a57d0));});});},Migration[_0x4ff490('0x1f')]['removeIndex']=function(_0x41e6ca,_0x5a5e5a){const _0x508f92=_0x4ff490,_0x57e496=this;this[_0x508f92('0xe')]['enqueue'](function(){const _0x2220d5=_0x508f92;return _0x57e496[_0x2220d5('0x18')][_0x2220d5('0x2')](_0x41e6ca,_0x5a5e5a)[_0x2220d5('0x25')](function(){const _0x3229f7=_0x2220d5;logger[_0x3229f7('0x1c')]('removeIndex\x20%s\x20%s',_0x41e6ca,_0x5a5e5a);})[_0x2220d5('0xc')](function(_0x5eaee9){const _0x33f711=_0x2220d5;logger['info'](JSON[_0x33f711('0x5')](_0x5eaee9));});});},Migration[_0x4ff490('0x1f')][_0x4ff490('0x24')]=function(_0x5639f1){const _0x47f897=_0x4ff490,_0x1cfb6c=this;this[_0x47f897('0xe')]['enqueue'](function(){const _0x4ccadf=_0x47f897;return _0x1cfb6c['queryInterface'][_0x4ccadf('0x0')][_0x4ccadf('0x24')](_0x5639f1)[_0x4ccadf('0x25')](function(){const _0x5917e3=_0x4ccadf;logger[_0x5917e3('0x1c')]('query\x20%s',_0x5639f1);})[_0x4ccadf('0xc')](function(_0x369d55){const _0x750526=_0x4ccadf;logger[_0x750526('0x1c')](JSON[_0x750526('0x5')](_0x369d55));});});},Migration['prototype'][_0x4ff490('0x22')]=function(_0x8ff774,_0xfe4c1a){const _0x380178=_0x4ff490,_0x3d47ad=this;this['sequence'][_0x380178('0x9')](function(){const _0x2c9333=_0x380178;return _0x3d47ad[_0x2c9333('0x18')][_0x2c9333('0x22')](_0x8ff774,_0xfe4c1a)[_0x2c9333('0x25')](function(){const _0x259b28=_0x2c9333;logger[_0x259b28('0x1c')](_0x259b28('0x15'),_0xfe4c1a,_0x8ff774);})[_0x2c9333('0xc')](function(_0x5357fa){const _0xf98096=_0x2c9333;logger[_0xf98096('0x1c')](util['inspect'](_0x5357fa,{'showHidden':![],'depth':null}));});});},Migration[_0x4ff490('0x1f')][_0x4ff490('0x2b')]=function(_0x53f627,_0x150c5a,_0x472a4f){const _0x2f1c41=_0x4ff490,_0x375ef0=this;this[_0x2f1c41('0xe')][_0x2f1c41('0x9')](function(){const _0x3b5f4e=_0x2f1c41;return _0x375ef0[_0x3b5f4e('0x18')][_0x3b5f4e('0x2b')](_0x53f627,_0x150c5a,_0x472a4f)[_0x3b5f4e('0x25')](function(){const _0x7e9d5f=_0x3b5f4e;logger['info'](_0x7e9d5f('0x23'),_0x150c5a,_0x472a4f,_0x53f627);})[_0x3b5f4e('0xc')](function(_0x56d441){const _0x4babb0=_0x3b5f4e;logger[_0x4babb0('0x1c')](util[_0x4babb0('0x20')](_0x56d441,{'showHidden':![],'depth':null}));});});},Migration[_0x4ff490('0x1f')][_0x4ff490('0x10')]=function(_0x43d359){this['sequence']['enqueue'](function(){return _0x43d359();});},module[_0x4ff490('0x27')]={'up':function(_0x2f3d01,_0x1ef7a8){return new Promise(function(_0x559b47){const _0x2a4b3e=a980_0x5b68,_0x41a3d3=new Migration(_0x2f3d01);_0x41a3d3['addColumn']('report_agent',_0x2a4b3e('0xb'),{'type':_0x1ef7a8[_0x2a4b3e('0x2d')],'defaultValue':![]}),_0x41a3d3[_0x2a4b3e('0x6')](_0x2a4b3e('0x8'),_0x2a4b3e('0x1d'),{'type':_0x1ef7a8['STRING'],'comment':_0x2a4b3e('0x1a')}),_0x41a3d3['addColumn'](_0x2a4b3e('0x8'),_0x2a4b3e('0x3'),{'type':_0x1ef7a8[_0x2a4b3e('0x21')]}),_0x41a3d3['addColumn'](_0x2a4b3e('0x8'),_0x2a4b3e('0x16'),{'type':_0x1ef7a8[_0x2a4b3e('0x21')]}),_0x41a3d3[_0x2a4b3e('0x6')](_0x2a4b3e('0x8'),_0x2a4b3e('0x28'),{'type':_0x1ef7a8[_0x2a4b3e('0x17')],'defaultValue':0x0}),_0x41a3d3[_0x2a4b3e('0x6')](_0x2a4b3e('0xa'),'systemanswertime',{'type':_0x1ef7a8['DATE']}),_0x41a3d3[_0x2a4b3e('0x6')]('int_salesforce_configurations',_0x2a4b3e('0x12'),{'type':_0x1ef7a8[_0x2a4b3e('0x2a')](_0x2a4b3e('0x1e'),_0x2a4b3e('0x26')),'defaultValue':_0x2a4b3e('0x1e')}),_0x41a3d3[_0x2a4b3e('0x10')](_0x559b47);});},'down':function(){}};