e5c7522bfdd587a1319a661fe2b47f33d032ae4b
[motion-next.git] / server / migrations / 2.0.71.js
1 const a950_0x19f1=['agentTransferTimeout','info','queueTransferTimeout','Changed\x20column\x20%s\x20in\x20table\x20%s','queueTransfer','Added\x20column\x20%s\x20to\x20%s','systemAlias','sequence','../config/logger','prototype','chat_websites','BOOLEAN','STRING','chatTimeout','dropTable','then','catch','tail','renameColumn','finally','removeIndex\x20%s\x20%s','removeIndex','sms_accounts','addIndex','systemAvatar','enqueue','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','Removed\x20column\x20%s\x20from\x20%s','inspect','changeColumn','openchannel_accounts','util','stringify','exports','final','data7','agentTransfer','INTEGER','sequelize','query','System','enableCustomerCheckmarks','fax_accounts','migration','addColumn','phoneBarRememberMeEnabled','TEXT','removeColumn','license','tools_actions','query\x20%s','queryInterface'];(function(_0x3417a6,_0x19f1c1){const _0x27fc82=function(_0x57642f){while(--_0x57642f){_0x3417a6['push'](_0x3417a6['shift']());}};_0x27fc82(++_0x19f1c1);}(a950_0x19f1,0x1b2));const a950_0x27fc=function(_0x3417a6,_0x19f1c1){_0x3417a6=_0x3417a6-0x0;let _0x27fc82=a950_0x19f1[_0x3417a6];return _0x27fc82;};const _0x41687f=a950_0x27fc;'use strict';const util=require(_0x41687f('0xd')),logger=require(_0x41687f('0x2a'))(_0x41687f('0x19')),Sequence=function(){};Sequence[_0x41687f('0x2b')][_0x41687f('0x7')]=function(_0x57642f){const _0x41f286=_0x41687f;this['tail']=this[_0x41f286('0x33')]?this[_0x41f286('0x33')][_0x41f286('0x1')](_0x57642f):_0x57642f();};const Migration=function(_0x46e8fa){const _0x4d42a6=_0x41687f;this[_0x4d42a6('0x21')]=_0x46e8fa,this[_0x4d42a6('0x29')]=new Sequence();};Migration['prototype'][_0x41687f('0xb')]=function(_0x432324,_0x2f16fe,_0x4d9341){const _0xee889a=_0x41687f,_0x2702ae=this;this[_0xee889a('0x29')]['enqueue'](function(){const _0x35206c=_0xee889a;return _0x2702ae[_0x35206c('0x21')][_0x35206c('0xb')](_0x432324,_0x2f16fe,_0x4d9341)['then'](function(){const _0x5b2333=_0x35206c;logger['info'](_0x5b2333('0x25'),_0x2f16fe,_0x432324);})['catch'](function(_0xa878b0){const _0x3a2f83=_0x35206c;logger[_0x3a2f83('0x23')](JSON[_0x3a2f83('0xe')](_0xa878b0));});});},Migration['prototype'][_0x41687f('0x1a')]=function(_0x4558f3,_0x4f396f,_0x1cd14e){const _0x2eeb50=_0x41687f,_0x38405c=this;this['sequence'][_0x2eeb50('0x7')](function(){const _0x550793=_0x2eeb50;return _0x38405c[_0x550793('0x21')][_0x550793('0x1a')](_0x4558f3,_0x4f396f,_0x1cd14e)[_0x550793('0x31')](function(){const _0x2cf4b8=_0x550793;logger[_0x2cf4b8('0x23')](_0x2cf4b8('0x27'),_0x4f396f,_0x4558f3);})[_0x550793('0x32')](function(_0xa09032){const _0x4efcc9=_0x550793;logger['info'](JSON[_0x4efcc9('0xe')](_0xa09032));});});},Migration[_0x41687f('0x2b')]['dropTable']=function(_0x53ea26){const _0x4b4013=_0x41687f,_0x3af74b=this;this['sequence'][_0x4b4013('0x7')](function(){const _0x230d1c=_0x4b4013;return _0x3af74b[_0x230d1c('0x21')][_0x230d1c('0x30')](_0x53ea26,{'force':!![]})[_0x230d1c('0x31')](function(){logger['info']('table\x20dropped\x20%s',_0x53ea26);})[_0x230d1c('0x32')](function(_0x4347d3){const _0x15508c=_0x230d1c;logger['info'](JSON[_0x15508c('0xe')](_0x4347d3));});});},Migration[_0x41687f('0x2b')][_0x41687f('0x5')]=function(_0x757c55,_0x26e64a,_0x5cedca){const _0x59cb51=_0x41687f,_0x59677e=this;this[_0x59cb51('0x29')][_0x59cb51('0x7')](function(){const _0x75f1f6=_0x59cb51;return _0x59677e[_0x75f1f6('0x21')][_0x75f1f6('0x5')](_0x757c55,_0x26e64a,{'indexName':_0x5cedca})[_0x75f1f6('0x31')](function(){const _0x4fcf32=_0x75f1f6;logger[_0x4fcf32('0x23')]('addIndex\x20%s\x20%s\x20%s',_0x757c55,_0x26e64a['join'](','),_0x5cedca);})[_0x75f1f6('0x32')](function(_0x27bb89){logger['info'](JSON['stringify'](_0x27bb89));});});},Migration['prototype']['removeIndex']=function(_0x53165e,_0xfd89af){const _0x5d4751=_0x41687f,_0x574894=this;this[_0x5d4751('0x29')][_0x5d4751('0x7')](function(){const _0x206849=_0x5d4751;return _0x574894[_0x206849('0x21')][_0x206849('0x3')](_0x53165e,_0xfd89af)[_0x206849('0x31')](function(){const _0x1bd858=_0x206849;logger[_0x1bd858('0x23')](_0x1bd858('0x2'),_0x53165e,_0xfd89af);})[_0x206849('0x32')](function(_0x2316db){const _0x45de28=_0x206849;logger[_0x45de28('0x23')](JSON[_0x45de28('0xe')](_0x2316db));});});},Migration[_0x41687f('0x2b')]['query']=function(_0x3a61b8){const _0x4a9886=_0x41687f,_0xbe4f3f=this;this[_0x4a9886('0x29')][_0x4a9886('0x7')](function(){const _0x50b5cf=_0x4a9886;return _0xbe4f3f[_0x50b5cf('0x21')][_0x50b5cf('0x14')]['query'](_0x3a61b8)[_0x50b5cf('0x31')](function(){const _0x2be7a2=_0x50b5cf;logger['info'](_0x2be7a2('0x20'),_0x3a61b8);})[_0x50b5cf('0x32')](function(_0x47071c){const _0x452863=_0x50b5cf;logger[_0x452863('0x23')](JSON[_0x452863('0xe')](_0x47071c));});});},Migration['prototype'][_0x41687f('0x1d')]=function(_0x3ea333,_0x185495){const _0x4d68dd=_0x41687f,_0x39ee75=this;this[_0x4d68dd('0x29')][_0x4d68dd('0x7')](function(){const _0x3044b6=_0x4d68dd;return _0x39ee75[_0x3044b6('0x21')][_0x3044b6('0x1d')](_0x3ea333,_0x185495)[_0x3044b6('0x31')](function(){const _0x5c6b3c=_0x3044b6;logger[_0x5c6b3c('0x23')](_0x5c6b3c('0x9'),_0x185495,_0x3ea333);})[_0x3044b6('0x32')](function(_0x402078){const _0x4394e5=_0x3044b6;logger[_0x4394e5('0x23')](util['inspect'](_0x402078,{'showHidden':![],'depth':null}));});});},Migration[_0x41687f('0x2b')]['renameColumn']=function(_0x212434,_0x41a511,_0x513ec7){const _0x5c1308=this;this['sequence']['enqueue'](function(){const _0x3cb001=a950_0x27fc;return _0x5c1308[_0x3cb001('0x21')][_0x3cb001('0x0')](_0x212434,_0x41a511,_0x513ec7)[_0x3cb001('0x31')](function(){const _0x1781ee=_0x3cb001;logger[_0x1781ee('0x23')](_0x1781ee('0x8'),_0x41a511,_0x513ec7,_0x212434);})['catch'](function(_0x264e65){const _0x155488=_0x3cb001;logger[_0x155488('0x23')](util[_0x155488('0xa')](_0x264e65,{'showHidden':![],'depth':null}));});});},Migration['prototype']['final']=function(_0x1263b3){const _0x4cca35=_0x41687f;this[_0x4cca35('0x29')]['enqueue'](function(){return _0x1263b3();});},module[_0x41687f('0xf')]={'up':function(_0x154c2,_0x1b068d){return new Promise(function(_0x102913){const _0x5002af=a950_0x27fc,_0x49f0ef=new Migration(_0x154c2);_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0x2c'),_0x5002af('0x26'),{'type':_0x1b068d[_0x5002af('0x2d')],'defaultValue':![]}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0x2c'),_0x5002af('0x17'),{'type':_0x1b068d[_0x5002af('0x2d')],'defaultValue':![]}),_0x49f0ef['addColumn'](_0x5002af('0x2c'),_0x5002af('0x24'),{'type':_0x1b068d[_0x5002af('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0x2c'),_0x5002af('0x12'),{'type':_0x1b068d[_0x5002af('0x2d')],'defaultValue':![]}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0x2c'),_0x5002af('0x22'),{'type':_0x1b068d[_0x5002af('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0x2c'),_0x5002af('0x28'),{'type':_0x1b068d[_0x5002af('0x2e')],'defaultValue':_0x5002af('0x16')}),_0x49f0ef['addColumn'](_0x5002af('0x2c'),_0x5002af('0x6'),{'type':_0x1b068d['TEXT']}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0x18'),_0x5002af('0x26'),{'type':_0x1b068d[_0x5002af('0x2d')],'defaultValue':![]}),_0x49f0ef['addColumn']('fax_accounts','queueTransferTimeout',{'type':_0x1b068d[_0x5002af('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0x18'),_0x5002af('0x12'),{'type':_0x1b068d[_0x5002af('0x2d')],'defaultValue':![]}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0x18'),_0x5002af('0x22'),{'type':_0x1b068d[_0x5002af('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0xc'),_0x5002af('0x26'),{'type':_0x1b068d[_0x5002af('0x2d')],'defaultValue':![]}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0xc'),'queueTransferTimeout',{'type':_0x1b068d['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0xc'),_0x5002af('0x12'),{'type':_0x1b068d['BOOLEAN'],'defaultValue':![]}),_0x49f0ef[_0x5002af('0x1a')]('openchannel_accounts','agentTransferTimeout',{'type':_0x1b068d['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x49f0ef[_0x5002af('0x1a')]('sms_accounts',_0x5002af('0x26'),{'type':_0x1b068d[_0x5002af('0x2d')],'defaultValue':![]}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0x4'),'queueTransferTimeout',{'type':_0x1b068d['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x49f0ef['addColumn']('sms_accounts','agentTransfer',{'type':_0x1b068d[_0x5002af('0x2d')],'defaultValue':![]}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0x4'),_0x5002af('0x22'),{'type':_0x1b068d[_0x5002af('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x49f0ef[_0x5002af('0x1a')]('settings',_0x5002af('0x2f'),{'type':_0x1b068d[_0x5002af('0x13')],'defaultValue':0x1e}),_0x49f0ef[_0x5002af('0x15')]('UPDATE\x20settings\x20SET\x20chatTimeout\x20=\x200;'),_0x49f0ef[_0x5002af('0x1a')]('settings',_0x5002af('0x1b'),{'type':_0x1b068d[_0x5002af('0x2d')],'defaultValue':!![]}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0x1e'),'chatLicenseExceeded',{'type':_0x1b068d[_0x5002af('0x13')],'defaultValue':0x0}),_0x49f0ef[_0x5002af('0x1a')](_0x5002af('0x1f'),_0x5002af('0x11'),{'type':_0x1b068d[_0x5002af('0x1c')]}),_0x49f0ef[_0x5002af('0x10')](_0x102913);});},'down':function(){}};