311c68b9d3be775fb6d975970bb4ea3c5cdb8530
[motion-next.git] / server / migrations / 2.0.50.js
1 const a929_0x26e1=['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());','inspect','STRING','Removed\x20column\x20%s\x20from\x20%s','voice_queues','dialMethod','removeColumn','progressive','booked','sms_messages','addIndex','final','messageId','tail','sequence','enqueue','then','exports','table\x20dropped\x20%s','addIndex\x20%s\x20%s\x20%s','changeColumn','catch','info','dropTable','preview','stringify','Changed\x20column\x20%s\x20in\x20table\x20%s','predictive','addColumn','sequelize','query','queryInterface','migration','prototype','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());','ENUM','util'];(function(_0x2c169e,_0x26e18c){const _0x37ce17=function(_0x24e2d0){while(--_0x24e2d0){_0x2c169e['push'](_0x2c169e['shift']());}};_0x37ce17(++_0x26e18c);}(a929_0x26e1,0xbb));const a929_0x37ce=function(_0x2c169e,_0x26e18c){_0x2c169e=_0x2c169e-0x0;let _0x37ce17=a929_0x26e1[_0x2c169e];return _0x37ce17;};const _0xb0b1ec=a929_0x37ce;'use strict';const util=require(_0xb0b1ec('0x22')),logger=require('../config/logger')(_0xb0b1ec('0x1e')),Sequence=function(){};Sequence[_0xb0b1ec('0x1f')][_0xb0b1ec('0xd')]=function(_0x24e2d0){const _0x3e98ea=_0xb0b1ec;this[_0x3e98ea('0xb')]=this['tail']?this[_0x3e98ea('0xb')]['finally'](_0x24e2d0):_0x24e2d0();};const Migration=function(_0xb076dd){const _0x4886b8=_0xb0b1ec;this['queryInterface']=_0xb076dd,this[_0x4886b8('0xc')]=new Sequence();};Migration[_0xb0b1ec('0x1f')]['changeColumn']=function(_0x28aa52,_0xc1428e,_0x52a307){const _0x332846=_0xb0b1ec,_0x530e19=this;this['sequence'][_0x332846('0xd')](function(){const _0x18de85=_0x332846;return _0x530e19[_0x18de85('0x1d')][_0x18de85('0x12')](_0x28aa52,_0xc1428e,_0x52a307)['then'](function(){const _0x41aea7=_0x18de85;logger[_0x41aea7('0x14')](_0x41aea7('0x18'),_0xc1428e,_0x28aa52);})[_0x18de85('0x13')](function(_0x343d7f){const _0x151328=_0x18de85;logger[_0x151328('0x14')](JSON[_0x151328('0x17')](_0x343d7f));});});},Migration['prototype'][_0xb0b1ec('0x1a')]=function(_0x201ec3,_0x837158,_0x243234){const _0x226572=_0xb0b1ec,_0x334f64=this;this['sequence'][_0x226572('0xd')](function(){const _0x39ec78=_0x226572;return _0x334f64['queryInterface'][_0x39ec78('0x1a')](_0x201ec3,_0x837158,_0x243234)[_0x39ec78('0xe')](function(){const _0x651a8a=_0x39ec78;logger[_0x651a8a('0x14')]('Added\x20column\x20%s\x20to\x20%s',_0x837158,_0x201ec3);})[_0x39ec78('0x13')](function(_0x5e8e60){const _0x208dba=_0x39ec78;logger[_0x208dba('0x14')](JSON[_0x208dba('0x17')](_0x5e8e60));});});},Migration[_0xb0b1ec('0x1f')][_0xb0b1ec('0x15')]=function(_0x451525){const _0x49c3b6=_0xb0b1ec,_0x1a629c=this;this[_0x49c3b6('0xc')]['enqueue'](function(){const _0x3b3348=_0x49c3b6;return _0x1a629c['queryInterface']['dropTable'](_0x451525,{'force':!![]})[_0x3b3348('0xe')](function(){const _0x2c872=_0x3b3348;logger['info'](_0x2c872('0x10'),_0x451525);})['catch'](function(_0x36025f){const _0x11690a=_0x3b3348;logger[_0x11690a('0x14')](JSON[_0x11690a('0x17')](_0x36025f));});});},Migration[_0xb0b1ec('0x1f')][_0xb0b1ec('0x8')]=function(_0x261be6,_0x584d3a,_0x4227fd){const _0x13c8c6=_0xb0b1ec,_0x57de16=this;this[_0x13c8c6('0xc')][_0x13c8c6('0xd')](function(){const _0x29e250=_0x13c8c6;return _0x57de16[_0x29e250('0x1d')][_0x29e250('0x8')](_0x261be6,_0x584d3a,{'indexName':_0x4227fd})['then'](function(){const _0x181f64=_0x29e250;logger[_0x181f64('0x14')](_0x181f64('0x11'),_0x261be6,_0x584d3a['join'](','),_0x4227fd);})['catch'](function(_0x26199b){const _0x43559d=_0x29e250;logger[_0x43559d('0x14')](JSON[_0x43559d('0x17')](_0x26199b));});});},Migration['prototype']['query']=function(_0x263365){const _0x3515ab=_0xb0b1ec,_0x3f70ce=this;this[_0x3515ab('0xc')][_0x3515ab('0xd')](function(){const _0x380d51=_0x3515ab;return _0x3f70ce[_0x380d51('0x1d')][_0x380d51('0x1b')][_0x380d51('0x1c')](_0x263365)[_0x380d51('0xe')](function(){const _0x77f923=_0x380d51;logger[_0x77f923('0x14')]('query\x20%s',_0x263365);})[_0x380d51('0x13')](function(_0xf37c1d){const _0x5eaa80=_0x380d51;logger[_0x5eaa80('0x14')](JSON[_0x5eaa80('0x17')](_0xf37c1d));});});},Migration[_0xb0b1ec('0x1f')][_0xb0b1ec('0x4')]=function(_0x426c43,_0x2b2cce){const _0x54bf32=_0xb0b1ec,_0x432c5e=this;this[_0x54bf32('0xc')][_0x54bf32('0xd')](function(){const _0x5ee3db=_0x54bf32;return _0x432c5e[_0x5ee3db('0x1d')][_0x5ee3db('0x4')](_0x426c43,_0x2b2cce)['then'](function(){const _0x3db8b6=_0x5ee3db;logger[_0x3db8b6('0x14')](_0x3db8b6('0x1'),_0x2b2cce,_0x426c43);})[_0x5ee3db('0x13')](function(_0x2e0005){const _0x3015f1=_0x5ee3db;logger[_0x3015f1('0x14')](util[_0x3015f1('0x24')](_0x2e0005,{'showHidden':![],'depth':null}));});});},Migration[_0xb0b1ec('0x1f')]['final']=function(_0x2c29dc){const _0x2ec078=_0xb0b1ec;this['sequence'][_0x2ec078('0xd')](function(){return _0x2c29dc();});},module[_0xb0b1ec('0xf')]={'up':function(_0x3a9d43,_0x52ffaf){return new Promise(function(_0x1d3f4c){const _0x14018a=a929_0x37ce,_0x5f4c8d=new Migration(_0x3a9d43);_0x5f4c8d[_0x14018a('0x12')](_0x14018a('0x7'),_0x14018a('0xa'),{'type':_0x52ffaf[_0x14018a('0x0')](0xbe)}),_0x5f4c8d[_0x14018a('0x8')](_0x14018a('0x7'),[_0x14018a('0xa')],_0x14018a('0xa')),_0x5f4c8d[_0x14018a('0x12')](_0x14018a('0x2'),_0x14018a('0x3'),{'type':_0x52ffaf[_0x14018a('0x21')](_0x14018a('0x16'),_0x14018a('0x5'),'power',_0x14018a('0x19'),_0x14018a('0x6')),'defaultValue':_0x14018a('0x5')}),_0x5f4c8d[_0x14018a('0x1c')]('DELETE\x20FROM\x20`voice_extensions`\x20WHERE\x20`exten`=\x27xcally-motion-preview\x27\x20AND\x20`priority`=\x206'),_0x5f4c8d[_0x14018a('0x1c')](_0x14018a('0x20')),_0x5f4c8d[_0x14018a('0x1c')](_0x14018a('0x23')),_0x5f4c8d[_0x14018a('0x9')](_0x1d3f4c);});},'down':function(){}};