Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / migrations / 2.5.0.js
index 3b38586..e2fb03f 100644 (file)
@@ -1 +1 @@
-const a1013_0xcff4=['transcribe','\x20CONSTRAINT\x20`whatsapp_accounts_ibfk_1`\x20FOREIGN\x20KEY\x20(`mandatoryDispositionPauseId`)\x20REFERENCES\x20`tools_pauses`\x20(`id`)\x20ON\x20DELETE\x20NO\x20ACTION\x20ON\x20UPDATE\x20CASCADE,',')\x20ENGINE=InnoDB\x20DEFAULT\x20CHARSET=utf8;','FLOAT','queryInterface','BOOLEAN','vidaooEscalation','dropTable','renameColumn','tail','chat_interactions','\x20KEY\x20`mandatoryDispositionPauseId`\x20(`mandatoryDispositionPauseId`),','language','sequence','failureReason','whatsappCapacity','fileUri','stringify','migration','sentimentRegion','inspect','\x20`mandatoryDispositionPauseId`\x20int(11)\x20DEFAULT\x20NULL,','bucket','query\x20%s','\x20`waitForTheAssignedAgent`\x20int(11)\x20DEFAULT\x20\x2710\x27,','INTEGER','prototype','removeIndex','then','\x20`token`\x20varchar(255)\x20DEFAULT\x20NULL,','removeColumn','location','tempSentiment','vidaooSessionId','automaticSentiment','\x20`ListId`\x20int(11)\x20DEFAULT\x20NULL,','\x20`notificationShake`\x20tinyint(1)\x20DEFAULT\x20\x270\x27,','Removed\x20column\x20%s\x20from\x20%s','transcribeName','\x20`queueTransfer`\x20tinyint(1)\x20DEFAULT\x20\x270\x27,','\x20`phone`\x20varchar(255)\x20DEFAULT\x20NULL,','vidaooApiKey','WhatsappAccountId','sentimentAccountId','join','\x20`description`\x20varchar(255)\x20DEFAULT\x20NULL,','info','\x20CONSTRAINT\x20`whatsapp_accounts_ibfk_2`\x20FOREIGN\x20KEY\x20(`ListId`)\x20REFERENCES\x20`cm_lists`\x20(`id`)\x20ON\x20DELETE\x20SET\x20NULL\x20ON\x20UPDATE\x20CASCADE','addIndex','sentiment','\x20`name`\x20varchar(255)\x20NOT\x20NULL,','removeIndex\x20%s\x20%s','chat_websites','UPDATE\x20users\x20SET\x20permissions=\x27101,102,103,113,110,104,105,106,107,108,109,100,111,114\x27\x20WHERE\x20role=\x27agent\x27\x20AND\x20permissions=\x27101,102,103,110,104,105,106,107,108,109,100,111\x27','CREATE\x20TABLE\x20`whatsapp_accounts`\x20(','changeColumn','\x20`queueTransferTimeout`\x20int(11)\x20DEFAULT\x20\x27300\x27,','TEXT','voice_recordings','settings','table\x20dropped\x20%s','\x20`mandatoryDisposition`\x20tinyint(1)\x20DEFAULT\x20\x270\x27,','ALTER\x20TABLE\x20tools_dispositions\x20ADD\x20CONSTRAINT\x20`name_whatsapp`\x20UNIQUE\x20KEY\x20(`name`,`WhatsappAccountId`)','addIndex\x20%s\x20%s\x20%s\x20[%s]','Added\x20column\x20%s\x20to\x20%s','\x20`authToken`\x20varchar(255)\x20DEFAULT\x20NULL,','STRING','sNeutral','\x20`updatedAt`\x20datetime\x20NOT\x20NULL,','\x20KEY\x20`ListId`\x20(`ListId`),','fileText','\x20`type`\x20enum(\x27twilio\x27)\x20DEFAULT\x20NULL,','transcribeStatus','transcribeAccountId','catch','transcribeRegion','\x20`createdAt`\x20datetime\x20NOT\x20NULL,','finally','\x20`agentTransfer`\x20tinyint(1)\x20DEFAULT\x20\x270\x27,','sMixed','enqueue','sNegative','users','addColumn','Changed\x20column\x20%s\x20in\x20table\x20%s','query','final','\x20`accountSid`\x20varchar(255)\x20DEFAULT\x20NULL,','ALTER\x20TABLE\x20tools_dispositions\x20ADD\x20CONSTRAINT\x20`tools_dispositions_ibfk_7`\x20FOREIGN\x20KEY\x20(`WhatsappAccountId`)\x20REFERENCES\x20`whatsapp_accounts`\x20(`id`)\x20ON\x20DELETE\x20SET\x20NULL\x20ON\x20UPDATE\x20CASCADE','ALTER\x20TABLE\x20tools_canned_answers\x20ADD\x20CONSTRAINT\x20`tools_canned_answers_ibfk_6`\x20FOREIGN\x20KEY\x20(`WhatsappAccountId`)\x20REFERENCES\x20`whatsapp_accounts`\x20(`id`)\x20ON\x20DELETE\x20SET\x20NULL\x20ON\x20UPDATE\x20CASCADE'];(function(_0x52834e,_0xcff4cc){const _0x35446d=function(_0x166ae4){while(--_0x166ae4){_0x52834e['push'](_0x52834e['shift']());}};_0x35446d(++_0xcff4cc);}(a1013_0xcff4,0x1cb));const a1013_0x3544=function(_0x52834e,_0xcff4cc){_0x52834e=_0x52834e-0x0;let _0x35446d=a1013_0xcff4[_0x52834e];return _0x35446d;};const _0x1176a2=a1013_0x3544;'use strict';const util=require('util'),logger=require('../config/logger')(_0x1176a2('0x9')),Sequence=function(){};Sequence['prototype'][_0x1176a2('0x47')]=function(_0x166ae4){const _0x3a7720=_0x1176a2;this[_0x3a7720('0x0')]=this['tail']?this['tail'][_0x3a7720('0x44')](_0x166ae4):_0x166ae4();};const Migration=function(_0x4cc90d){const _0x1aab6e=_0x1176a2;this[_0x1aab6e('0x55')]=_0x4cc90d,this['sequence']=new Sequence();};Migration[_0x1176a2('0x11')][_0x1176a2('0x2e')]=function(_0x48e33d,_0xd48542,_0x482392){const _0x47f68d=_0x1176a2,_0x1373b1=this;this['sequence'][_0x47f68d('0x47')](function(){const _0x553e86=_0x47f68d;return _0x1373b1[_0x553e86('0x55')][_0x553e86('0x2e')](_0x48e33d,_0xd48542,_0x482392)[_0x553e86('0x13')](function(){const _0x6e53e8=_0x553e86;logger[_0x6e53e8('0x25')](_0x6e53e8('0x4b'),_0xd48542,_0x48e33d);})[_0x553e86('0x41')](function(_0x4392f4){const _0x5316a6=_0x553e86;logger[_0x5316a6('0x25')](JSON[_0x5316a6('0x8')](_0x4392f4));});});},Migration[_0x1176a2('0x11')]['addColumn']=function(_0x18d511,_0x23f988,_0x30c987){const _0x3b1484=_0x1176a2,_0xebb863=this;this[_0x3b1484('0x4')][_0x3b1484('0x47')](function(){const _0x4d0df0=_0x3b1484;return _0xebb863[_0x4d0df0('0x55')][_0x4d0df0('0x4a')](_0x18d511,_0x23f988,_0x30c987)[_0x4d0df0('0x13')](function(){const _0xf87b50=_0x4d0df0;logger[_0xf87b50('0x25')](_0xf87b50('0x37'),_0x23f988,_0x18d511);})['catch'](function(_0x17877c){const _0x592044=_0x4d0df0;logger['info'](JSON[_0x592044('0x8')](_0x17877c));});});},Migration[_0x1176a2('0x11')][_0x1176a2('0x58')]=function(_0x521335){const _0x54577f=this;this['sequence']['enqueue'](function(){const _0x2629f3=a1013_0x3544;return _0x54577f[_0x2629f3('0x55')]['dropTable'](_0x521335,{'force':!![]})[_0x2629f3('0x13')](function(){const _0xe3c34d=_0x2629f3;logger['info'](_0xe3c34d('0x33'),_0x521335);})[_0x2629f3('0x41')](function(_0x2761f9){const _0x178832=_0x2629f3;logger[_0x178832('0x25')](JSON[_0x178832('0x8')](_0x2761f9));});});},Migration['prototype'][_0x1176a2('0x27')]=function(_0x1cd97a,_0x49c126,_0x15224a){const _0x42639f=_0x1176a2,_0x24fd46=this;this[_0x42639f('0x4')][_0x42639f('0x47')](function(){const _0x4333ea=_0x42639f;return _0x24fd46['queryInterface'][_0x4333ea('0x27')](_0x1cd97a,_0x49c126,{'indexName':_0x15224a['indexName'],'indicesType':_0x15224a['indicesType']})[_0x4333ea('0x13')](function(){const _0x431513=_0x4333ea;logger['info'](_0x431513('0x36'),_0x1cd97a,_0x49c126[_0x431513('0x23')](','),_0x15224a['indexName'],_0x15224a['indicesType']);})[_0x4333ea('0x41')](function(_0xdbac34){const _0x5b08ed=_0x4333ea;logger[_0x5b08ed('0x25')](JSON[_0x5b08ed('0x8')](_0xdbac34));});});},Migration[_0x1176a2('0x11')][_0x1176a2('0x12')]=function(_0x54c8a0,_0xac61fb){const _0x45417b=_0x1176a2,_0x35699d=this;this[_0x45417b('0x4')][_0x45417b('0x47')](function(){const _0x212f7b=_0x45417b;return _0x35699d[_0x212f7b('0x55')][_0x212f7b('0x12')](_0x54c8a0,_0xac61fb)[_0x212f7b('0x13')](function(){const _0x1df58b=_0x212f7b;logger['info'](_0x1df58b('0x2a'),_0x54c8a0,_0xac61fb);})['catch'](function(_0x278a1d){const _0x4a07e7=_0x212f7b;logger[_0x4a07e7('0x25')](JSON[_0x4a07e7('0x8')](_0x278a1d));});});},Migration[_0x1176a2('0x11')][_0x1176a2('0x4c')]=function(_0x33d4aa){const _0x90de46=_0x1176a2,_0x319cc6=this;this[_0x90de46('0x4')][_0x90de46('0x47')](function(){const _0x53cdcf=_0x90de46;return _0x319cc6['queryInterface']['sequelize']['query'](_0x33d4aa)[_0x53cdcf('0x13')](function(){const _0x423cfb=_0x53cdcf;logger[_0x423cfb('0x25')](_0x423cfb('0xe'),_0x33d4aa);})[_0x53cdcf('0x41')](function(_0x5516a3){const _0x48c8a7=_0x53cdcf;logger[_0x48c8a7('0x25')](JSON['stringify'](_0x5516a3));});});},Migration[_0x1176a2('0x11')][_0x1176a2('0x15')]=function(_0x4ed9c8,_0x125614){const _0x48bb87=_0x1176a2,_0x4d9449=this;this[_0x48bb87('0x4')][_0x48bb87('0x47')](function(){const _0x2c50c0=_0x48bb87;return _0x4d9449[_0x2c50c0('0x55')]['removeColumn'](_0x4ed9c8,_0x125614)[_0x2c50c0('0x13')](function(){const _0x224367=_0x2c50c0;logger[_0x224367('0x25')](_0x224367('0x1c'),_0x125614,_0x4ed9c8);})[_0x2c50c0('0x41')](function(_0x59246a){const _0x37744a=_0x2c50c0;logger[_0x37744a('0x25')](util[_0x37744a('0xb')](_0x59246a,{'showHidden':![],'depth':null}));});});},Migration[_0x1176a2('0x11')]['renameColumn']=function(_0x33c2a8,_0x364c9e,_0x124eaa){const _0x5bc1e9=_0x1176a2,_0x26d3d7=this;this[_0x5bc1e9('0x4')][_0x5bc1e9('0x47')](function(){const _0x452a98=_0x5bc1e9;return _0x26d3d7['queryInterface'][_0x452a98('0x59')](_0x33c2a8,_0x364c9e,_0x124eaa)[_0x452a98('0x13')](function(){const _0x56cdab=_0x452a98;logger[_0x56cdab('0x25')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x364c9e,_0x124eaa,_0x33c2a8);})[_0x452a98('0x41')](function(_0x2288a6){const _0x13898d=_0x452a98;logger[_0x13898d('0x25')](util['inspect'](_0x2288a6,{'showHidden':![],'depth':null}));});});},Migration[_0x1176a2('0x11')]['final']=function(_0x36baaa){this['sequence']['enqueue'](function(){return _0x36baaa();});},module['exports']={'up':function(_0x3238d9,_0x45d65a){return new Promise(function(_0x54d898){const _0x3264c4=a1013_0x3544,_0x2aca4f=new Migration(_0x3238d9);_0x2aca4f[_0x3264c4('0x4c')](_0x3264c4('0x2d')+'\x20`id`\x20int(11)\x20NOT\x20NULL\x20AUTO_INCREMENT,'+_0x3264c4('0x29')+'\x20`key`\x20varchar(255)\x20NOT\x20NULL,'+'\x20`remote`\x20varchar(255)\x20NOT\x20NULL,'+_0x3264c4('0x14')+_0x3264c4('0x1f')+_0x3264c4('0x3e')+_0x3264c4('0x4e')+_0x3264c4('0x38')+'\x20`notificationTemplate`\x20text,'+'\x20`notificationSound`\x20tinyint(1)\x20DEFAULT\x20\x270\x27,'+_0x3264c4('0x1b')+_0x3264c4('0xf')+_0x3264c4('0x1e')+_0x3264c4('0x2f')+_0x3264c4('0x45')+'\x20`agentTransferTimeout`\x20int(11)\x20DEFAULT\x20\x27300\x27,'+_0x3264c4('0xc')+_0x3264c4('0x34')+_0x3264c4('0x24')+_0x3264c4('0x43')+_0x3264c4('0x3b')+_0x3264c4('0x1a')+'\x20PRIMARY\x20KEY\x20(`id`),'+'\x20UNIQUE\x20KEY\x20`name`\x20(`name`),'+_0x3264c4('0x2')+_0x3264c4('0x3c')+_0x3264c4('0x52')+_0x3264c4('0x26')+_0x3264c4('0x53')),_0x2aca4f[_0x3264c4('0x4a')]('tools_dispositions',_0x3264c4('0x21'),{'type':_0x45d65a[_0x3264c4('0x10')]}),_0x2aca4f[_0x3264c4('0x4a')]('tools_canned_answers',_0x3264c4('0x21'),{'type':_0x45d65a['INTEGER']}),_0x2aca4f[_0x3264c4('0x4a')]('users','whatsappPause',{'type':_0x45d65a['BOOLEAN'],'defaultValue':![]}),_0x2aca4f[_0x3264c4('0x4a')](_0x3264c4('0x49'),_0x3264c4('0x6'),{'type':_0x45d65a['BOOLEAN'],'defaultValue':![]}),_0x2aca4f['query'](_0x3264c4('0x4f')),_0x2aca4f[_0x3264c4('0x4c')](_0x3264c4('0x35')),_0x2aca4f[_0x3264c4('0x4c')](_0x3264c4('0x50')),_0x2aca4f[_0x3264c4('0x4c')](_0x3264c4('0x2c')),_0x2aca4f[_0x3264c4('0x4a')](_0x3264c4('0x1'),_0x3264c4('0x18'),{'type':_0x45d65a[_0x3264c4('0x30')]}),_0x2aca4f[_0x3264c4('0x4a')](_0x3264c4('0x2b'),_0x3264c4('0x57'),{'type':_0x45d65a['BOOLEAN'],'defaultValue':![]}),_0x2aca4f['addColumn'](_0x3264c4('0x2b'),_0x3264c4('0x20'),{'type':_0x45d65a[_0x3264c4('0x39')]}),_0x2aca4f[_0x3264c4('0x4a')]('voice_recordings',_0x3264c4('0x16'),{'type':_0x45d65a['TEXT']}),_0x2aca4f[_0x3264c4('0x4a')](_0x3264c4('0x31'),_0x3264c4('0x1d'),{'type':_0x45d65a['STRING']}),_0x2aca4f[_0x3264c4('0x4a')]('voice_recordings',_0x3264c4('0x3f'),{'type':_0x45d65a['STRING'],'defaultValue':'NEW'}),_0x2aca4f[_0x3264c4('0x4a')](_0x3264c4('0x31'),_0x3264c4('0x7'),{'type':_0x45d65a[_0x3264c4('0x30')]}),_0x2aca4f[_0x3264c4('0x4a')]('voice_recordings',_0x3264c4('0x3d'),{'type':_0x45d65a[_0x3264c4('0x30')]}),_0x2aca4f['addColumn'](_0x3264c4('0x31'),_0x3264c4('0x5'),{'type':_0x45d65a[_0x3264c4('0x30')]}),_0x2aca4f['addColumn'](_0x3264c4('0x31'),_0x3264c4('0x28'),{'type':_0x45d65a[_0x3264c4('0x39')]}),_0x2aca4f[_0x3264c4('0x4a')](_0x3264c4('0x31'),'sPositive',{'type':_0x45d65a[_0x3264c4('0x54')]}),_0x2aca4f['addColumn']('voice_recordings',_0x3264c4('0x48'),{'type':_0x45d65a[_0x3264c4('0x54')]}),_0x2aca4f['addColumn'](_0x3264c4('0x31'),_0x3264c4('0x3a'),{'type':_0x45d65a[_0x3264c4('0x54')]}),_0x2aca4f['addColumn'](_0x3264c4('0x31'),_0x3264c4('0x46'),{'type':_0x45d65a['FLOAT']}),_0x2aca4f[_0x3264c4('0x4a')]('voice_recordings',_0x3264c4('0x17'),{'type':_0x45d65a[_0x3264c4('0x56')]}),_0x2aca4f['addColumn'](_0x3264c4('0x32'),_0x3264c4('0x51'),{'type':_0x45d65a[_0x3264c4('0x56')]}),_0x2aca4f[_0x3264c4('0x4a')](_0x3264c4('0x32'),'automaticTranscribe',{'type':_0x45d65a['BOOLEAN']}),_0x2aca4f[_0x3264c4('0x4a')]('settings',_0x3264c4('0x40'),{'type':_0x45d65a['INTEGER']}),_0x2aca4f[_0x3264c4('0x4a')](_0x3264c4('0x32'),_0x3264c4('0x42'),{'type':_0x45d65a[_0x3264c4('0x39')]}),_0x2aca4f[_0x3264c4('0x4a')](_0x3264c4('0x32'),_0x3264c4('0x28'),{'type':_0x45d65a[_0x3264c4('0x56')]}),_0x2aca4f[_0x3264c4('0x4a')]('settings',_0x3264c4('0x19'),{'type':_0x45d65a[_0x3264c4('0x56')]}),_0x2aca4f[_0x3264c4('0x4a')](_0x3264c4('0x32'),_0x3264c4('0x22'),{'type':_0x45d65a[_0x3264c4('0x10')]}),_0x2aca4f[_0x3264c4('0x4a')](_0x3264c4('0x32'),_0x3264c4('0xa'),{'type':_0x45d65a[_0x3264c4('0x39')]}),_0x2aca4f['addColumn']('settings',_0x3264c4('0x3'),{'type':_0x45d65a['STRING']}),_0x2aca4f['addColumn'](_0x3264c4('0x32'),_0x3264c4('0xd'),{'type':_0x45d65a[_0x3264c4('0x39')]}),_0x2aca4f[_0x3264c4('0x4d')](_0x54d898);});},'down':function(){}};
\ No newline at end of file
+const a1013_0x1415=['\x20`mandatoryDisposition`\x20tinyint(1)\x20DEFAULT\x20\x270\x27,','fileUri','tail','settings','\x20`accountSid`\x20varchar(255)\x20DEFAULT\x20NULL,','transcribeRegion','\x20`id`\x20int(11)\x20NOT\x20NULL\x20AUTO_INCREMENT,','NEW','vidaooApiKey','sentiment','STRING','table\x20dropped\x20%s','ALTER\x20TABLE\x20tools_canned_answers\x20ADD\x20CONSTRAINT\x20`tools_canned_answers_ibfk_6`\x20FOREIGN\x20KEY\x20(`WhatsappAccountId`)\x20REFERENCES\x20`whatsapp_accounts`\x20(`id`)\x20ON\x20DELETE\x20SET\x20NULL\x20ON\x20UPDATE\x20CASCADE','sentimentAccountId','Added\x20column\x20%s\x20to\x20%s','\x20`waitForTheAssignedAgent`\x20int(11)\x20DEFAULT\x20\x2710\x27,','addIndex\x20%s\x20%s\x20%s\x20[%s]','sPositive','renameColumn','TEXT','\x20`createdAt`\x20datetime\x20NOT\x20NULL,','sentimentRegion','automaticTranscribe','\x20`updatedAt`\x20datetime\x20NOT\x20NULL,','users','dropTable','\x20`notificationShake`\x20tinyint(1)\x20DEFAULT\x20\x270\x27,','indicesType',')\x20ENGINE=InnoDB\x20DEFAULT\x20CHARSET=utf8;','queryInterface','\x20`token`\x20varchar(255)\x20DEFAULT\x20NULL,','indexName','\x20`remote`\x20varchar(255)\x20NOT\x20NULL,','Removed\x20column\x20%s\x20from\x20%s','\x20`type`\x20enum(\x27twilio\x27)\x20DEFAULT\x20NULL,','removeColumn','whatsappPause','BOOLEAN','\x20`name`\x20varchar(255)\x20NOT\x20NULL,','stringify','ALTER\x20TABLE\x20tools_dispositions\x20ADD\x20CONSTRAINT\x20`tools_dispositions_ibfk_7`\x20FOREIGN\x20KEY\x20(`WhatsappAccountId`)\x20REFERENCES\x20`whatsapp_accounts`\x20(`id`)\x20ON\x20DELETE\x20SET\x20NULL\x20ON\x20UPDATE\x20CASCADE','changeColumn','chat_interactions','migration','\x20`key`\x20varchar(255)\x20NOT\x20NULL,','removeIndex\x20%s\x20%s','Changed\x20column\x20%s\x20in\x20table\x20%s','query','tools_canned_answers','automaticSentiment','ALTER\x20TABLE\x20tools_dispositions\x20ADD\x20CONSTRAINT\x20`name_whatsapp`\x20UNIQUE\x20KEY\x20(`name`,`WhatsappAccountId`)','\x20UNIQUE\x20KEY\x20`name`\x20(`name`),','sMixed','finally','addColumn','\x20CONSTRAINT\x20`whatsapp_accounts_ibfk_1`\x20FOREIGN\x20KEY\x20(`mandatoryDispositionPauseId`)\x20REFERENCES\x20`tools_pauses`\x20(`id`)\x20ON\x20DELETE\x20NO\x20ACTION\x20ON\x20UPDATE\x20CASCADE,','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','chat_websites','exports','transcribeName','UPDATE\x20users\x20SET\x20permissions=\x27101,102,103,113,110,104,105,106,107,108,109,100,111,114\x27\x20WHERE\x20role=\x27agent\x27\x20AND\x20permissions=\x27101,102,103,110,104,105,106,107,108,109,100,111\x27','INTEGER','inspect','query\x20%s','sNegative','sNeutral','transcribe','\x20PRIMARY\x20KEY\x20(`id`),','\x20`notificationTemplate`\x20text,','\x20`mandatoryDispositionPauseId`\x20int(11)\x20DEFAULT\x20NULL,','FLOAT','enqueue','fileText','addIndex','whatsappCapacity','then','\x20`queueTransferTimeout`\x20int(11)\x20DEFAULT\x20\x27300\x27,','removeIndex','info','sequelize','\x20`phone`\x20varchar(255)\x20DEFAULT\x20NULL,','catch','prototype','voice_recordings','tools_dispositions','util','sequence','\x20`queueTransfer`\x20tinyint(1)\x20DEFAULT\x20\x270\x27,','vidaooSessionId','\x20KEY\x20`ListId`\x20(`ListId`),','join','\x20`agentTransfer`\x20tinyint(1)\x20DEFAULT\x20\x270\x27,','bucket','final'];(function(_0x252809,_0x141584){const _0x1d8f16=function(_0x208210){while(--_0x208210){_0x252809['push'](_0x252809['shift']());}};_0x1d8f16(++_0x141584);}(a1013_0x1415,0x115));const a1013_0x1d8f=function(_0x252809,_0x141584){_0x252809=_0x252809-0x0;let _0x1d8f16=a1013_0x1415[_0x252809];return _0x1d8f16;};const _0x27d971=a1013_0x1d8f;'use strict';const util=require(_0x27d971('0x5a')),logger=require('../config/logger')(_0x27d971('0x30')),Sequence=function(){};Sequence[_0x27d971('0x57')][_0x27d971('0x4c')]=function(_0x208210){const _0x5d301f=_0x27d971;this[_0x5d301f('0x7')]=this[_0x5d301f('0x7')]?this[_0x5d301f('0x7')][_0x5d301f('0x3a')](_0x208210):_0x208210();};const Migration=function(_0x27c33b){const _0x337146=_0x27d971;this[_0x337146('0x22')]=_0x27c33b,this[_0x337146('0x5b')]=new Sequence();};Migration[_0x27d971('0x57')][_0x27d971('0x2e')]=function(_0x2ac874,_0x1f4c51,_0x1ce572){const _0x338ec1=_0x27d971,_0x5f4589=this;this[_0x338ec1('0x5b')][_0x338ec1('0x4c')](function(){const _0x3a7c2e=_0x338ec1;return _0x5f4589[_0x3a7c2e('0x22')][_0x3a7c2e('0x2e')](_0x2ac874,_0x1f4c51,_0x1ce572)['then'](function(){const _0xd6ef5=_0x3a7c2e;logger[_0xd6ef5('0x53')](_0xd6ef5('0x33'),_0x1f4c51,_0x2ac874);})[_0x3a7c2e('0x56')](function(_0x4529be){const _0x230094=_0x3a7c2e;logger[_0x230094('0x53')](JSON[_0x230094('0x2c')](_0x4529be));});});},Migration[_0x27d971('0x57')][_0x27d971('0x3b')]=function(_0x461dae,_0x4bf6a7,_0x42db7e){const _0x3b8171=_0x27d971,_0x572ec6=this;this[_0x3b8171('0x5b')][_0x3b8171('0x4c')](function(){const _0x55ad8a=_0x3b8171;return _0x572ec6[_0x55ad8a('0x22')][_0x55ad8a('0x3b')](_0x461dae,_0x4bf6a7,_0x42db7e)['then'](function(){const _0x42a812=_0x55ad8a;logger[_0x42a812('0x53')](_0x42a812('0x13'),_0x4bf6a7,_0x461dae);})['catch'](function(_0xcfaf87){const _0x44ff6a=_0x55ad8a;logger['info'](JSON[_0x44ff6a('0x2c')](_0xcfaf87));});});},Migration['prototype'][_0x27d971('0x1e')]=function(_0x3d49b5){const _0x4bee9e=_0x27d971,_0x5979e4=this;this['sequence'][_0x4bee9e('0x4c')](function(){const _0x223660=_0x4bee9e;return _0x5979e4[_0x223660('0x22')][_0x223660('0x1e')](_0x3d49b5,{'force':!![]})[_0x223660('0x50')](function(){const _0x13d2b5=_0x223660;logger[_0x13d2b5('0x53')](_0x13d2b5('0x10'),_0x3d49b5);})[_0x223660('0x56')](function(_0x53781b){const _0x5d3ebc=_0x223660;logger['info'](JSON[_0x5d3ebc('0x2c')](_0x53781b));});});},Migration['prototype'][_0x27d971('0x4e')]=function(_0x45cb05,_0x4b328d,_0x5f28de){const _0x3c4a7a=_0x27d971,_0x2d6d7b=this;this['sequence'][_0x3c4a7a('0x4c')](function(){const _0x3d940d=_0x3c4a7a;return _0x2d6d7b['queryInterface'][_0x3d940d('0x4e')](_0x45cb05,_0x4b328d,{'indexName':_0x5f28de['indexName'],'indicesType':_0x5f28de['indicesType']})[_0x3d940d('0x50')](function(){const _0x42e55b=_0x3d940d;logger[_0x42e55b('0x53')](_0x42e55b('0x15'),_0x45cb05,_0x4b328d[_0x42e55b('0x1')](','),_0x5f28de[_0x42e55b('0x24')],_0x5f28de[_0x42e55b('0x20')]);})['catch'](function(_0x478a49){const _0x4a10c3=_0x3d940d;logger[_0x4a10c3('0x53')](JSON['stringify'](_0x478a49));});});},Migration[_0x27d971('0x57')][_0x27d971('0x52')]=function(_0x226892,_0x20afde){const _0x52ea7e=this;this['sequence']['enqueue'](function(){const _0x48fc9a=a1013_0x1d8f;return _0x52ea7e['queryInterface'][_0x48fc9a('0x52')](_0x226892,_0x20afde)[_0x48fc9a('0x50')](function(){const _0x101586=_0x48fc9a;logger[_0x101586('0x53')](_0x101586('0x32'),_0x226892,_0x20afde);})[_0x48fc9a('0x56')](function(_0x5e6935){const _0x11df3c=_0x48fc9a;logger[_0x11df3c('0x53')](JSON['stringify'](_0x5e6935));});});},Migration[_0x27d971('0x57')][_0x27d971('0x34')]=function(_0x10dbce){const _0x1cce74=_0x27d971,_0x2aafcf=this;this[_0x1cce74('0x5b')][_0x1cce74('0x4c')](function(){const _0x16d03a=_0x1cce74;return _0x2aafcf[_0x16d03a('0x22')][_0x16d03a('0x54')][_0x16d03a('0x34')](_0x10dbce)[_0x16d03a('0x50')](function(){const _0x24a5db=_0x16d03a;logger['info'](_0x24a5db('0x44'),_0x10dbce);})[_0x16d03a('0x56')](function(_0x3a59ed){const _0xc23e3d=_0x16d03a;logger[_0xc23e3d('0x53')](JSON['stringify'](_0x3a59ed));});});},Migration[_0x27d971('0x57')]['removeColumn']=function(_0x196f91,_0x518256){const _0x568683=_0x27d971,_0x3b0dc0=this;this[_0x568683('0x5b')]['enqueue'](function(){const _0x454086=_0x568683;return _0x3b0dc0[_0x454086('0x22')][_0x454086('0x28')](_0x196f91,_0x518256)[_0x454086('0x50')](function(){const _0x2248c6=_0x454086;logger['info'](_0x2248c6('0x26'),_0x518256,_0x196f91);})[_0x454086('0x56')](function(_0x300fbc){const _0x4118dd=_0x454086;logger[_0x4118dd('0x53')](util[_0x4118dd('0x43')](_0x300fbc,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x27d971('0x17')]=function(_0x496475,_0xa38837,_0x442682){const _0x1bd941=_0x27d971,_0x45c6c8=this;this[_0x1bd941('0x5b')][_0x1bd941('0x4c')](function(){const _0x28efad=_0x1bd941;return _0x45c6c8['queryInterface'][_0x28efad('0x17')](_0x496475,_0xa38837,_0x442682)[_0x28efad('0x50')](function(){const _0xcb3411=_0x28efad;logger['info'](_0xcb3411('0x3d'),_0xa38837,_0x442682,_0x496475);})[_0x28efad('0x56')](function(_0x547b7d){const _0x1c087e=_0x28efad;logger['info'](util[_0x1c087e('0x43')](_0x547b7d,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x27d971('0x4')]=function(_0x1301d8){const _0x3fd0f8=_0x27d971;this[_0x3fd0f8('0x5b')][_0x3fd0f8('0x4c')](function(){return _0x1301d8();});},module[_0x27d971('0x3f')]={'up':function(_0x40c919,_0x5afe0b){return new Promise(function(_0x36ced1){const _0x45b971=a1013_0x1d8f,_0x202bc7=new Migration(_0x40c919);_0x202bc7[_0x45b971('0x34')]('CREATE\x20TABLE\x20`whatsapp_accounts`\x20('+_0x45b971('0xb')+_0x45b971('0x2b')+_0x45b971('0x31')+_0x45b971('0x25')+_0x45b971('0x23')+_0x45b971('0x55')+_0x45b971('0x27')+_0x45b971('0x9')+'\x20`authToken`\x20varchar(255)\x20DEFAULT\x20NULL,'+_0x45b971('0x49')+'\x20`notificationSound`\x20tinyint(1)\x20DEFAULT\x20\x270\x27,'+_0x45b971('0x1f')+_0x45b971('0x14')+_0x45b971('0x5c')+_0x45b971('0x51')+_0x45b971('0x2')+'\x20`agentTransferTimeout`\x20int(11)\x20DEFAULT\x20\x27300\x27,'+_0x45b971('0x4a')+_0x45b971('0x5')+'\x20`description`\x20varchar(255)\x20DEFAULT\x20NULL,'+_0x45b971('0x19')+_0x45b971('0x1c')+'\x20`ListId`\x20int(11)\x20DEFAULT\x20NULL,'+_0x45b971('0x48')+_0x45b971('0x38')+'\x20KEY\x20`mandatoryDispositionPauseId`\x20(`mandatoryDispositionPauseId`),'+_0x45b971('0x0')+_0x45b971('0x3c')+'\x20CONSTRAINT\x20`whatsapp_accounts_ibfk_2`\x20FOREIGN\x20KEY\x20(`ListId`)\x20REFERENCES\x20`cm_lists`\x20(`id`)\x20ON\x20DELETE\x20SET\x20NULL\x20ON\x20UPDATE\x20CASCADE'+_0x45b971('0x21')),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x59'),'WhatsappAccountId',{'type':_0x5afe0b['INTEGER']}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x35'),'WhatsappAccountId',{'type':_0x5afe0b[_0x45b971('0x42')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x1d'),_0x45b971('0x29'),{'type':_0x5afe0b[_0x45b971('0x2a')],'defaultValue':![]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x1d'),_0x45b971('0x4f'),{'type':_0x5afe0b[_0x45b971('0x2a')],'defaultValue':![]}),_0x202bc7['query'](_0x45b971('0x2d')),_0x202bc7[_0x45b971('0x34')](_0x45b971('0x37')),_0x202bc7[_0x45b971('0x34')](_0x45b971('0x11')),_0x202bc7[_0x45b971('0x34')](_0x45b971('0x41')),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x2f'),_0x45b971('0x5d'),{'type':_0x5afe0b[_0x45b971('0x18')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x3e'),'vidaooEscalation',{'type':_0x5afe0b[_0x45b971('0x2a')],'defaultValue':![]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x3e'),_0x45b971('0xd'),{'type':_0x5afe0b['STRING']}),_0x202bc7['addColumn']('voice_recordings','location',{'type':_0x5afe0b['TEXT']}),_0x202bc7[_0x45b971('0x3b')]('voice_recordings',_0x45b971('0x40'),{'type':_0x5afe0b[_0x45b971('0xf')]}),_0x202bc7[_0x45b971('0x3b')]('voice_recordings','transcribeStatus',{'type':_0x5afe0b[_0x45b971('0xf')],'defaultValue':_0x45b971('0xc')}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x58'),_0x45b971('0x6'),{'type':_0x5afe0b[_0x45b971('0x18')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x58'),_0x45b971('0x4d'),{'type':_0x5afe0b[_0x45b971('0x18')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x58'),'failureReason',{'type':_0x5afe0b['TEXT']}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x58'),_0x45b971('0xe'),{'type':_0x5afe0b[_0x45b971('0xf')]}),_0x202bc7['addColumn'](_0x45b971('0x58'),_0x45b971('0x16'),{'type':_0x5afe0b['FLOAT']}),_0x202bc7['addColumn'](_0x45b971('0x58'),_0x45b971('0x45'),{'type':_0x5afe0b[_0x45b971('0x4b')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x58'),_0x45b971('0x46'),{'type':_0x5afe0b[_0x45b971('0x4b')]}),_0x202bc7[_0x45b971('0x3b')]('voice_recordings',_0x45b971('0x39'),{'type':_0x5afe0b['FLOAT']}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x58'),'tempSentiment',{'type':_0x5afe0b[_0x45b971('0x2a')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x8'),_0x45b971('0x47'),{'type':_0x5afe0b[_0x45b971('0x2a')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x8'),_0x45b971('0x1b'),{'type':_0x5afe0b[_0x45b971('0x2a')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x8'),'transcribeAccountId',{'type':_0x5afe0b[_0x45b971('0x42')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x8'),_0x45b971('0xa'),{'type':_0x5afe0b[_0x45b971('0xf')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x8'),_0x45b971('0xe'),{'type':_0x5afe0b[_0x45b971('0x2a')]}),_0x202bc7['addColumn'](_0x45b971('0x8'),_0x45b971('0x36'),{'type':_0x5afe0b[_0x45b971('0x2a')]}),_0x202bc7['addColumn'](_0x45b971('0x8'),_0x45b971('0x12'),{'type':_0x5afe0b[_0x45b971('0x42')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x8'),_0x45b971('0x1a'),{'type':_0x5afe0b[_0x45b971('0xf')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x8'),'language',{'type':_0x5afe0b[_0x45b971('0xf')]}),_0x202bc7[_0x45b971('0x3b')](_0x45b971('0x8'),_0x45b971('0x3'),{'type':_0x5afe0b[_0x45b971('0xf')]}),_0x202bc7['final'](_0x36ced1);});},'down':function(){}};
\ No newline at end of file