b1101ed2c6acd0cfa8800ffacd4f90c0f4b99618
[motion-next.git] / server / migrations / 2.0.50.js
1 const a929_0x43c1=['predictive','Removed\x20column\x20%s\x20from\x20%s','booked','enqueue','tail','dialMethod','sequence','finally','table\x20dropped\x20%s','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\x276\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());','info','addColumn','final','catch','ENUM','preview','prototype','dropTable','removeColumn','stringify','addIndex','sms_messages','migration','exports','query','messageId','Added\x20column\x20%s\x20to\x20%s','changeColumn','query\x20%s','inspect','Changed\x20column\x20%s\x20in\x20table\x20%s','sequelize','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\x277\x27,\x20\x27hangup\x27,\x20\x27system\x27,\x20\x27dialer\x20extensions\x20auto\x20generated\x27,\x20NOW(),\x20NOW());','join','STRING','voice_queues','progressive','DELETE\x20FROM\x20`voice_extensions`\x20WHERE\x20`exten`=\x27xcally-motion-preview\x27\x20AND\x20`priority`=\x206','then','queryInterface'];(function(_0x5c29aa,_0x43c127){const _0x1e81a7=function(_0x37dca4){while(--_0x37dca4){_0x5c29aa['push'](_0x5c29aa['shift']());}};_0x1e81a7(++_0x43c127);}(a929_0x43c1,0xe7));const a929_0x1e81=function(_0x5c29aa,_0x43c127){_0x5c29aa=_0x5c29aa-0x0;let _0x1e81a7=a929_0x43c1[_0x5c29aa];return _0x1e81a7;};const _0x29fd78=a929_0x1e81;'use strict';const util=require('util'),logger=require('../config/logger')(_0x29fd78('0x1f')),Sequence=function(){};Sequence[_0x29fd78('0x19')][_0x29fd78('0xc')]=function(_0x37dca4){const _0x139576=_0x29fd78;this[_0x139576('0xd')]=this[_0x139576('0xd')]?this[_0x139576('0xd')][_0x139576('0x10')](_0x37dca4):_0x37dca4();};const Migration=function(_0x601677){const _0x8df440=_0x29fd78;this[_0x8df440('0x8')]=_0x601677,this[_0x8df440('0xf')]=new Sequence();};Migration[_0x29fd78('0x19')][_0x29fd78('0x24')]=function(_0x3e4151,_0x29871c,_0x164f79){const _0xe02c52=_0x29fd78,_0x512a5d=this;this[_0xe02c52('0xf')][_0xe02c52('0xc')](function(){const _0x2d556c=_0xe02c52;return _0x512a5d[_0x2d556c('0x8')][_0x2d556c('0x24')](_0x3e4151,_0x29871c,_0x164f79)[_0x2d556c('0x7')](function(){const _0x28843e=_0x2d556c;logger[_0x28843e('0x13')](_0x28843e('0x27'),_0x29871c,_0x3e4151);})[_0x2d556c('0x16')](function(_0x35f68a){const _0x1eee03=_0x2d556c;logger[_0x1eee03('0x13')](JSON[_0x1eee03('0x1c')](_0x35f68a));});});},Migration[_0x29fd78('0x19')][_0x29fd78('0x14')]=function(_0x34acb5,_0x71ff96,_0x5f24f7){const _0x3cac65=_0x29fd78,_0x17b19e=this;this[_0x3cac65('0xf')]['enqueue'](function(){const _0x233278=_0x3cac65;return _0x17b19e[_0x233278('0x8')][_0x233278('0x14')](_0x34acb5,_0x71ff96,_0x5f24f7)[_0x233278('0x7')](function(){const _0x19736b=_0x233278;logger[_0x19736b('0x13')](_0x19736b('0x23'),_0x71ff96,_0x34acb5);})[_0x233278('0x16')](function(_0x563dd3){const _0x59c503=_0x233278;logger[_0x59c503('0x13')](JSON[_0x59c503('0x1c')](_0x563dd3));});});},Migration['prototype'][_0x29fd78('0x1a')]=function(_0x1ed4ac){const _0x5dcb94=_0x29fd78,_0x3af66b=this;this[_0x5dcb94('0xf')]['enqueue'](function(){const _0x4cb549=_0x5dcb94;return _0x3af66b['queryInterface'][_0x4cb549('0x1a')](_0x1ed4ac,{'force':!![]})[_0x4cb549('0x7')](function(){const _0x932ac5=_0x4cb549;logger[_0x932ac5('0x13')](_0x932ac5('0x11'),_0x1ed4ac);})['catch'](function(_0x45fa07){const _0x3c7313=_0x4cb549;logger['info'](JSON[_0x3c7313('0x1c')](_0x45fa07));});});},Migration[_0x29fd78('0x19')]['addIndex']=function(_0x18f52c,_0x3188d2,_0x473082){const _0x3ecabc=_0x29fd78,_0x1580ec=this;this[_0x3ecabc('0xf')]['enqueue'](function(){const _0x558b8e=_0x3ecabc;return _0x1580ec[_0x558b8e('0x8')][_0x558b8e('0x1d')](_0x18f52c,_0x3188d2,{'indexName':_0x473082})['then'](function(){const _0x389b27=_0x558b8e;logger[_0x389b27('0x13')]('addIndex\x20%s\x20%s\x20%s',_0x18f52c,_0x3188d2[_0x389b27('0x2')](','),_0x473082);})[_0x558b8e('0x16')](function(_0x2b9b3c){const _0x1a5032=_0x558b8e;logger[_0x1a5032('0x13')](JSON[_0x1a5032('0x1c')](_0x2b9b3c));});});},Migration[_0x29fd78('0x19')][_0x29fd78('0x21')]=function(_0x3f897b){const _0x434d92=_0x29fd78,_0x17ecb4=this;this[_0x434d92('0xf')][_0x434d92('0xc')](function(){const _0x43a2c4=_0x434d92;return _0x17ecb4[_0x43a2c4('0x8')][_0x43a2c4('0x0')][_0x43a2c4('0x21')](_0x3f897b)['then'](function(){const _0x5408d9=_0x43a2c4;logger['info'](_0x5408d9('0x25'),_0x3f897b);})[_0x43a2c4('0x16')](function(_0x241018){logger['info'](JSON['stringify'](_0x241018));});});},Migration[_0x29fd78('0x19')][_0x29fd78('0x1b')]=function(_0x4ef7a3,_0x55ee16){const _0x2d7960=_0x29fd78,_0x59e4de=this;this[_0x2d7960('0xf')]['enqueue'](function(){const _0xa8078d=_0x2d7960;return _0x59e4de['queryInterface'][_0xa8078d('0x1b')](_0x4ef7a3,_0x55ee16)[_0xa8078d('0x7')](function(){const _0x45e457=_0xa8078d;logger[_0x45e457('0x13')](_0x45e457('0xa'),_0x55ee16,_0x4ef7a3);})[_0xa8078d('0x16')](function(_0xc45c2){const _0x1ba22b=_0xa8078d;logger[_0x1ba22b('0x13')](util[_0x1ba22b('0x26')](_0xc45c2,{'showHidden':![],'depth':null}));});});},Migration[_0x29fd78('0x19')][_0x29fd78('0x15')]=function(_0x1f2754){const _0x233eef=_0x29fd78;this[_0x233eef('0xf')][_0x233eef('0xc')](function(){return _0x1f2754();});},module[_0x29fd78('0x20')]={'up':function(_0x2f5d62,_0x2f0cb1){return new Promise(function(_0x3a4317){const _0x7e78ae=a929_0x1e81,_0x12b27c=new Migration(_0x2f5d62);_0x12b27c['changeColumn'](_0x7e78ae('0x1e'),_0x7e78ae('0x22'),{'type':_0x2f0cb1[_0x7e78ae('0x3')](0xbe)}),_0x12b27c[_0x7e78ae('0x1d')](_0x7e78ae('0x1e'),[_0x7e78ae('0x22')],_0x7e78ae('0x22')),_0x12b27c['changeColumn'](_0x7e78ae('0x4'),_0x7e78ae('0xe'),{'type':_0x2f0cb1[_0x7e78ae('0x17')](_0x7e78ae('0x18'),_0x7e78ae('0x5'),'power',_0x7e78ae('0x9'),_0x7e78ae('0xb')),'defaultValue':_0x7e78ae('0x5')}),_0x12b27c[_0x7e78ae('0x21')](_0x7e78ae('0x6')),_0x12b27c[_0x7e78ae('0x21')](_0x7e78ae('0x12')),_0x12b27c[_0x7e78ae('0x21')](_0x7e78ae('0x1')),_0x12b27c[_0x7e78ae('0x15')](_0x3a4317);});},'down':function(){}};