Built motion from commit 709aa6fb5ed03aa61bc373fcdbf622215d37d30b. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.60.js
1 const a938_0x5348=['removeColumn','finally','chat_websites','join','Removed\x20column\x20%s\x20from\x20%s','query','waitForTheAssignedAgent','INTEGER','stringify','website_alias','openedBy','inspect','migration','prototype','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','final','openchannel_accounts','sequelize','../config/logger','phoneBarEnableJaws','mail_interactions','STRING','openchannel_interactions','then','query\x20%s','sms_accounts','mail_accounts','tail','renameColumn','fax_accounts','sms_interactions','info','queryInterface','enqueue','addIndex','table\x20dropped\x20%s','changeColumn','agentIdentifier','addColumn','sequence','long','catch','exports'];(function(_0x4e518a,_0x5348aa){const _0x50e5bf=function(_0x3578f8){while(--_0x3578f8){_0x4e518a['push'](_0x4e518a['shift']());}};_0x50e5bf(++_0x5348aa);}(a938_0x5348,0x193));const a938_0x50e5=function(_0x4e518a,_0x5348aa){_0x4e518a=_0x4e518a-0x0;let _0x50e5bf=a938_0x5348[_0x4e518a];return _0x50e5bf;};const _0x205ae1=a938_0x50e5;'use strict';const util=require('util'),logger=require(_0x205ae1('0x2'))(_0x205ae1('0x27')),Sequence=function(){};Sequence['prototype']['enqueue']=function(_0x3578f8){const _0x462f20=_0x205ae1;this[_0x462f20('0xb')]=this[_0x462f20('0xb')]?this[_0x462f20('0xb')][_0x462f20('0x1c')](_0x3578f8):_0x3578f8();};const Migration=function(_0x5eae35){const _0x24f6ba=_0x205ae1;this['queryInterface']=_0x5eae35,this[_0x24f6ba('0x17')]=new Sequence();};Migration[_0x205ae1('0x28')][_0x205ae1('0x14')]=function(_0x43338c,_0x513dde,_0x5630a2){const _0xf2ac64=_0x205ae1,_0x13ba0a=this;this[_0xf2ac64('0x17')][_0xf2ac64('0x11')](function(){const _0x2dee1a=_0xf2ac64;return _0x13ba0a[_0x2dee1a('0x10')][_0x2dee1a('0x14')](_0x43338c,_0x513dde,_0x5630a2)[_0x2dee1a('0x7')](function(){const _0x31f3e7=_0x2dee1a;logger[_0x31f3e7('0xf')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x513dde,_0x43338c);})['catch'](function(_0x55ad3b){const _0x97e2d8=_0x2dee1a;logger['info'](JSON[_0x97e2d8('0x23')](_0x55ad3b));});});},Migration[_0x205ae1('0x28')][_0x205ae1('0x16')]=function(_0x117b7f,_0x5ac081,_0x1b044e){const _0x5da6e1=_0x205ae1,_0x2cb2db=this;this[_0x5da6e1('0x17')][_0x5da6e1('0x11')](function(){const _0x5d8b2a=_0x5da6e1;return _0x2cb2db[_0x5d8b2a('0x10')][_0x5d8b2a('0x16')](_0x117b7f,_0x5ac081,_0x1b044e)[_0x5d8b2a('0x7')](function(){logger['info']('Added\x20column\x20%s\x20to\x20%s',_0x5ac081,_0x117b7f);})['catch'](function(_0x4d6d6b){const _0x19675b=_0x5d8b2a;logger[_0x19675b('0xf')](JSON['stringify'](_0x4d6d6b));});});},Migration['prototype']['dropTable']=function(_0x2ff7ab){const _0x4718a9=this;this['sequence']['enqueue'](function(){const _0x584f01=a938_0x50e5;return _0x4718a9[_0x584f01('0x10')]['dropTable'](_0x2ff7ab,{'force':!![]})[_0x584f01('0x7')](function(){const _0x3fc3f4=_0x584f01;logger[_0x3fc3f4('0xf')](_0x3fc3f4('0x13'),_0x2ff7ab);})[_0x584f01('0x19')](function(_0x7c1e53){const _0x41e5d9=_0x584f01;logger[_0x41e5d9('0xf')](JSON[_0x41e5d9('0x23')](_0x7c1e53));});});},Migration[_0x205ae1('0x28')][_0x205ae1('0x12')]=function(_0x1dbb06,_0x573a39,_0x5cbac0){const _0x5ee0cd=_0x205ae1,_0x5e9504=this;this[_0x5ee0cd('0x17')][_0x5ee0cd('0x11')](function(){const _0x52a56f=_0x5ee0cd;return _0x5e9504[_0x52a56f('0x10')]['addIndex'](_0x1dbb06,_0x573a39,{'indexName':_0x5cbac0})[_0x52a56f('0x7')](function(){const _0x38a79c=_0x52a56f;logger['info']('addIndex\x20%s\x20%s\x20%s',_0x1dbb06,_0x573a39[_0x38a79c('0x1e')](','),_0x5cbac0);})[_0x52a56f('0x19')](function(_0x241dd4){const _0x51fa64=_0x52a56f;logger[_0x51fa64('0xf')](JSON[_0x51fa64('0x23')](_0x241dd4));});});},Migration[_0x205ae1('0x28')][_0x205ae1('0x20')]=function(_0x232f59){const _0x35d383=_0x205ae1,_0x392d26=this;this[_0x35d383('0x17')][_0x35d383('0x11')](function(){const _0x431449=_0x35d383;return _0x392d26[_0x431449('0x10')][_0x431449('0x1')][_0x431449('0x20')](_0x232f59)[_0x431449('0x7')](function(){const _0x7d6020=_0x431449;logger['info'](_0x7d6020('0x8'),_0x232f59);})[_0x431449('0x19')](function(_0x21e77f){const _0x3a59b4=_0x431449;logger[_0x3a59b4('0xf')](JSON[_0x3a59b4('0x23')](_0x21e77f));});});},Migration['prototype'][_0x205ae1('0x1b')]=function(_0x4f12b1,_0x57ac64){const _0x4b4c67=_0x205ae1,_0x566d30=this;this[_0x4b4c67('0x17')][_0x4b4c67('0x11')](function(){const _0x30d83a=_0x4b4c67;return _0x566d30[_0x30d83a('0x10')]['removeColumn'](_0x4f12b1,_0x57ac64)['then'](function(){const _0x5e5826=_0x30d83a;logger[_0x5e5826('0xf')](_0x5e5826('0x1f'),_0x57ac64,_0x4f12b1);})[_0x30d83a('0x19')](function(_0x425bb3){const _0xdbcd8c=_0x30d83a;logger[_0xdbcd8c('0xf')](util[_0xdbcd8c('0x26')](_0x425bb3,{'showHidden':![],'depth':null}));});});},Migration[_0x205ae1('0x28')][_0x205ae1('0xc')]=function(_0x5ccc70,_0x243a55,_0x50281f){const _0x391d7f=_0x205ae1,_0xa4009b=this;this[_0x391d7f('0x17')][_0x391d7f('0x11')](function(){const _0x495047=_0x391d7f;return _0xa4009b[_0x495047('0x10')][_0x495047('0xc')](_0x5ccc70,_0x243a55,_0x50281f)['then'](function(){const _0xc931f2=_0x495047;logger['info'](_0xc931f2('0x29'),_0x243a55,_0x50281f,_0x5ccc70);})[_0x495047('0x19')](function(_0x50bb40){const _0x53e447=_0x495047;logger[_0x53e447('0xf')](util[_0x53e447('0x26')](_0x50bb40,{'showHidden':![],'depth':null}));});});},Migration[_0x205ae1('0x28')][_0x205ae1('0x2a')]=function(_0x444e1b){const _0x18ce03=_0x205ae1;this[_0x18ce03('0x17')][_0x18ce03('0x11')](function(){return _0x444e1b();});},module[_0x205ae1('0x1a')]={'up':function(_0x162b7b,_0xab01c9){return new Promise(function(_0x2b184e){const _0x5f2d2b=a938_0x50e5,_0x44b060=new Migration(_0x162b7b);_0x44b060[_0x5f2d2b('0x16')](_0x5f2d2b('0x1d'),_0x5f2d2b('0x15'),{'type':_0xab01c9[_0x5f2d2b('0x5')],'defaultValue':_0x5f2d2b('0x24')}),_0x44b060['addColumn'](_0x5f2d2b('0x1d'),_0x5f2d2b('0x21'),{'type':_0xab01c9[_0x5f2d2b('0x22')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x44b060['removeColumn']('chat_interactions','openedBy'),_0x44b060[_0x5f2d2b('0x1b')](_0x5f2d2b('0x4'),_0x5f2d2b('0x25')),_0x44b060[_0x5f2d2b('0x16')](_0x5f2d2b('0x4'),'lastMsgBody',{'type':_0xab01c9['TEXT'](_0x5f2d2b('0x18'))}),_0x44b060[_0x5f2d2b('0x1b')](_0x5f2d2b('0xe'),_0x5f2d2b('0x25')),_0x44b060[_0x5f2d2b('0x1b')]('fax_interactions',_0x5f2d2b('0x25')),_0x44b060[_0x5f2d2b('0x1b')](_0x5f2d2b('0x6'),_0x5f2d2b('0x25')),_0x44b060['addColumn'](_0x5f2d2b('0x6'),'from',{'type':_0xab01c9[_0x5f2d2b('0x5')]}),_0x44b060[_0x5f2d2b('0x16')](_0x5f2d2b('0xa'),'waitForTheAssignedAgent',{'type':_0xab01c9[_0x5f2d2b('0x22')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x44b060[_0x5f2d2b('0x16')](_0x5f2d2b('0x0'),_0x5f2d2b('0x21'),{'type':_0xab01c9[_0x5f2d2b('0x22')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x44b060[_0x5f2d2b('0x16')](_0x5f2d2b('0xd'),_0x5f2d2b('0x21'),{'type':_0xab01c9['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x44b060[_0x5f2d2b('0x16')](_0x5f2d2b('0x9'),_0x5f2d2b('0x21'),{'type':_0xab01c9[_0x5f2d2b('0x22')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x44b060['addColumn']('users',_0x5f2d2b('0x3'),{'type':_0xab01c9['BOOLEAN'],'defaultValue':![]}),_0x44b060['final'](_0x2b184e);});},'down':function(){}};