Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.49.js
1 const a928_0x238e=['INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-preview\x27,\x20\x274\x27,\x20\x27Execif\x27,\x20\x27$[\x22${XMD-AGI}\x22\x20!=\x20\x22NONE\x22\x20]?AGI(${XMD-AGI})\x27,\x20\x27system\x27,\x20\x27dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','Changed\x20column\x20%s\x20in\x20table\x20%s','users','DELETE\x20FROM\x20`voice_extensions`\x20WHERE\x20`exten`=\x27xcally-motion-preview\x27\x20AND\x20`priority`=\x205','queryInterface','util','offlineMessageBody','enqueue','query','STRING','basic','dropTable','Added\x20column\x20%s\x20to\x20%s','migration','DELETE\x20FROM\x20`voice_extensions`\x20WHERE\x20`exten`=\x27xcally-motion-dialer\x27\x20AND\x20`priority`=\x2011','finally','dialAgiAfterHangupAgent','changeColumn','query\x20%s','DATE','chat_websites','ENUM','senderString','../config/logger','You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:','stringify','addColumn','sequence','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-preview\x27,\x20\x276\x27,\x20\x27hangup\x27,\x20\x27system\x27,\x20\x27dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','agiafterat','INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x2711\x27,\x20\x27Execif\x27,\x20\x27$[\x22${XMD-AGIAFTER}\x22\x20!=\x20\x22NONE\x22\x20]?AGI(${XMD-AGIAFTER})\x27,\x20\x27system\x27,\x20\x27dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','exports','dialQueueProject2','addIndex','BOOLEAN','table\x20dropped\x20%s','dialAgiAfterHangupClient','offlineMessageSubject','sequelize','password','New\x20offline\x20message\x20from\x20websiteName','tail','sms_accounts','username','info','catch','inspect','final','Removed\x20column\x20%s\x20from\x20%s','classic+','voice_queues','then','prototype','allowmessenger','addIndex\x20%s\x20%s\x20%s'];(function(_0x18cc4d,_0x238eba){const _0x52631f=function(_0x1f6205){while(--_0x1f6205){_0x18cc4d['push'](_0x18cc4d['shift']());}};_0x52631f(++_0x238eba);}(a928_0x238e,0x102));const a928_0x5263=function(_0x18cc4d,_0x238eba){_0x18cc4d=_0x18cc4d-0x0;let _0x52631f=a928_0x238e[_0x18cc4d];return _0x52631f;};const _0x319e24=a928_0x5263;'use strict';const util=require(_0x319e24('0x16')),logger=require(_0x319e24('0x28'))(_0x319e24('0x1e')),Sequence=function(){};Sequence[_0x319e24('0xe')]['enqueue']=function(_0x1f6205){const _0x42bf53=_0x319e24;this['tail']=this['tail']?this[_0x42bf53('0x3')][_0x42bf53('0x20')](_0x1f6205):_0x1f6205();};const Migration=function(_0x501687){const _0x16b86f=_0x319e24;this[_0x16b86f('0x15')]=_0x501687,this[_0x16b86f('0x2c')]=new Sequence();};Migration[_0x319e24('0xe')][_0x319e24('0x22')]=function(_0x537c4b,_0x4bde16,_0xd9cba5){const _0x3d4a23=this;this['sequence']['enqueue'](function(){const _0x630b1=a928_0x5263;return _0x3d4a23[_0x630b1('0x15')]['changeColumn'](_0x537c4b,_0x4bde16,_0xd9cba5)[_0x630b1('0xd')](function(){const _0x4d2c11=_0x630b1;logger[_0x4d2c11('0x6')](_0x4d2c11('0x12'),_0x4bde16,_0x537c4b);})[_0x630b1('0x7')](function(_0x5f141b){const _0x33ebcc=_0x630b1;logger[_0x33ebcc('0x6')](JSON['stringify'](_0x5f141b));});});},Migration[_0x319e24('0xe')][_0x319e24('0x2b')]=function(_0x4c263c,_0x5531aa,_0x3191d2){const _0x5d2ce7=_0x319e24,_0x44f6e3=this;this[_0x5d2ce7('0x2c')]['enqueue'](function(){const _0x534621=_0x5d2ce7;return _0x44f6e3[_0x534621('0x15')][_0x534621('0x2b')](_0x4c263c,_0x5531aa,_0x3191d2)[_0x534621('0xd')](function(){const _0x7aea41=_0x534621;logger['info'](_0x7aea41('0x1d'),_0x5531aa,_0x4c263c);})[_0x534621('0x7')](function(_0xfcd0d1){logger['info'](JSON['stringify'](_0xfcd0d1));});});},Migration[_0x319e24('0xe')][_0x319e24('0x1c')]=function(_0xc5235b){const _0x2fa48f=_0x319e24,_0x219166=this;this[_0x2fa48f('0x2c')][_0x2fa48f('0x18')](function(){const _0x2d51aa=_0x2fa48f;return _0x219166['queryInterface'][_0x2d51aa('0x1c')](_0xc5235b,{'force':!![]})[_0x2d51aa('0xd')](function(){const _0x243c06=_0x2d51aa;logger['info'](_0x243c06('0x34'),_0xc5235b);})[_0x2d51aa('0x7')](function(_0x470960){const _0x5ac168=_0x2d51aa;logger[_0x5ac168('0x6')](JSON['stringify'](_0x470960));});});},Migration[_0x319e24('0xe')][_0x319e24('0x32')]=function(_0x1cf3c1,_0x51eb50,_0x5ce542){const _0x250226=_0x319e24,_0x4b7468=this;this['sequence'][_0x250226('0x18')](function(){const _0x54ffdb=_0x250226;return _0x4b7468[_0x54ffdb('0x15')]['addIndex'](_0x1cf3c1,_0x51eb50,{'indexName':_0x5ce542})[_0x54ffdb('0xd')](function(){const _0x2e217a=_0x54ffdb;logger[_0x2e217a('0x6')](_0x2e217a('0x10'),_0x1cf3c1,_0x51eb50['join'](','),_0x5ce542);})[_0x54ffdb('0x7')](function(_0x12d5fc){const _0x388803=_0x54ffdb;logger['info'](JSON[_0x388803('0x2a')](_0x12d5fc));});});},Migration[_0x319e24('0xe')][_0x319e24('0x19')]=function(_0x512156){const _0x47df4e=_0x319e24,_0x2bbe2c=this;this[_0x47df4e('0x2c')][_0x47df4e('0x18')](function(){const _0x3fbb8e=_0x47df4e;return _0x2bbe2c['queryInterface'][_0x3fbb8e('0x0')][_0x3fbb8e('0x19')](_0x512156)[_0x3fbb8e('0xd')](function(){const _0x332ef7=_0x3fbb8e;logger[_0x332ef7('0x6')](_0x332ef7('0x23'),_0x512156);})[_0x3fbb8e('0x7')](function(_0x24fb01){const _0x404620=_0x3fbb8e;logger['info'](JSON[_0x404620('0x2a')](_0x24fb01));});});},Migration[_0x319e24('0xe')]['removeColumn']=function(_0x40e79f,_0x42d57d){const _0x10d776=_0x319e24,_0x5318bd=this;this[_0x10d776('0x2c')][_0x10d776('0x18')](function(){const _0x420c60=_0x10d776;return _0x5318bd['queryInterface']['removeColumn'](_0x40e79f,_0x42d57d)[_0x420c60('0xd')](function(){const _0x2caed=_0x420c60;logger[_0x2caed('0x6')](_0x2caed('0xa'),_0x42d57d,_0x40e79f);})[_0x420c60('0x7')](function(_0x2a0daf){const _0x18e2b8=_0x420c60;logger[_0x18e2b8('0x6')](util[_0x18e2b8('0x8')](_0x2a0daf,{'showHidden':![],'depth':null}));});});},Migration[_0x319e24('0xe')][_0x319e24('0x9')]=function(_0x44d7e7){this['sequence']['enqueue'](function(){return _0x44d7e7();});},module[_0x319e24('0x30')]={'up':function(_0xe21eb0,_0x283318){return new Promise(function(_0x928450){const _0x11a1a9=a928_0x5263,_0x141514=new Migration(_0xe21eb0);_0x141514[_0x11a1a9('0x2b')]('sms_accounts','smsMethod',{'type':_0x283318[_0x11a1a9('0x26')](_0x11a1a9('0x1b'),'classic',_0x11a1a9('0xb'))}),_0x141514[_0x11a1a9('0x2b')]('sms_accounts',_0x11a1a9('0x5'),{'type':_0x283318[_0x11a1a9('0x1a')]}),_0x141514['addColumn']('sms_accounts',_0x11a1a9('0x1'),{'type':_0x283318[_0x11a1a9('0x1a')]}),_0x141514[_0x11a1a9('0x2b')](_0x11a1a9('0x4'),_0x11a1a9('0x27'),{'type':_0x283318[_0x11a1a9('0x1a')]}),_0x141514['addColumn']('sms_accounts','deliveryReport',{'type':_0x283318[_0x11a1a9('0x33')],'defaultValue':![]}),_0x141514[_0x11a1a9('0x2b')](_0x11a1a9('0x13'),_0x11a1a9('0xf'),{'type':_0x283318['BOOLEAN'],'defaultValue':!![]}),_0x141514[_0x11a1a9('0x2b')](_0x11a1a9('0x13'),'phoneBarOutboundProxy',{'type':_0x283318[_0x11a1a9('0x1a')]}),_0x141514[_0x11a1a9('0x2b')](_0x11a1a9('0x25'),_0x11a1a9('0x36'),{'type':_0x283318[_0x11a1a9('0x1a')],'defaultValue':_0x11a1a9('0x2')}),_0x141514[_0x11a1a9('0x2b')](_0x11a1a9('0x25'),_0x11a1a9('0x17'),{'type':_0x283318[_0x11a1a9('0x1a')],'defaultValue':_0x11a1a9('0x29')}),_0x141514['addColumn'](_0x11a1a9('0xc'),_0x11a1a9('0x31'),{'type':_0x283318[_0x11a1a9('0x1a')]}),_0x141514['addColumn'](_0x11a1a9('0xc'),_0x11a1a9('0x35'),{'type':_0x283318[_0x11a1a9('0x33')],'defaultValue':![]}),_0x141514[_0x11a1a9('0x2b')](_0x11a1a9('0xc'),_0x11a1a9('0x21'),{'type':_0x283318[_0x11a1a9('0x33')],'defaultValue':![]}),_0x141514[_0x11a1a9('0x19')](_0x11a1a9('0x1f')),_0x141514['query'](_0x11a1a9('0x2f')),_0x141514[_0x11a1a9('0x19')]('INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-dialer\x27,\x20\x2712\x27,\x20\x27Hangup\x27,\x20\x27system\x27,\x20\x27dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());'),_0x141514[_0x11a1a9('0x19')]('DELETE\x20FROM\x20`voice_extensions`\x20WHERE\x20`exten`=\x27xcally-motion-preview\x27\x20AND\x20`priority`=\x204'),_0x141514[_0x11a1a9('0x19')](_0x11a1a9('0x14')),_0x141514['query'](_0x11a1a9('0x11')),_0x141514[_0x11a1a9('0x19')]('INSERT\x20INTO\x20`voice_extensions`\x20(`context`,\x20`exten`,\x20`priority`,\x20`app`,\x20`appdata`,\x20`type`,\x20`description`,\x20`createdAt`,\x20`updatedAt`)\x20VALUES\x20(\x27from-sip\x27,\x20\x27xcally-motion-preview\x27,\x20\x275\x27,\x20\x27dial\x27,\x20\x27${XMD-DIALCHANNEL},${XMD-DIALTIMEOUT},${XMD-DIALOPTIONS},${XMD-DIALURL}\x27,\x20\x27system\x27,\x20\x27dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());'),_0x141514['query'](_0x11a1a9('0x2d')),_0x141514['addColumn']('cm_hopper_final',_0x11a1a9('0x2e'),{'type':_0x283318[_0x11a1a9('0x24')]}),_0x141514[_0x11a1a9('0x9')](_0x928450);});},'down':function(){}};