Built motion from commit 459747fdfe53bbf13fbede61eeaffea1f1438f86. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.60.js
1 const a939_0x5a31=['STRING','removeColumn','sequelize','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','changeColumn','openchannel_interactions','waitForTheAssignedAgent','INTEGER','enqueue','query','then','sms_accounts','migration','dropTable','prototype','sms_interactions','mail_interactions','agentIdentifier','phoneBarEnableJaws','queryInterface','website_alias','long','renameColumn','chat_websites','query\x20%s','TEXT','table\x20dropped\x20%s','fax_accounts','exports','addColumn','info','util','tail','openedBy','stringify','lastMsgBody','catch','addIndex','../config/logger','fax_interactions','final','Changed\x20column\x20%s\x20in\x20table\x20%s','inspect','sequence','Added\x20column\x20%s\x20to\x20%s'];(function(_0x183d61,_0x5a316f){const _0x37081d=function(_0x3a4e22){while(--_0x3a4e22){_0x183d61['push'](_0x183d61['shift']());}};_0x37081d(++_0x5a316f);}(a939_0x5a31,0x114));const a939_0x3708=function(_0x183d61,_0x5a316f){_0x183d61=_0x183d61-0x0;let _0x37081d=a939_0x5a31[_0x183d61];return _0x37081d;};const _0xf473fc=a939_0x3708;'use strict';const util=require(_0xf473fc('0x19')),logger=require(_0xf473fc('0x20'))(_0xf473fc('0x6')),Sequence=function(){};Sequence[_0xf473fc('0x8')]['enqueue']=function(_0x3a4e22){const _0x2708dd=_0xf473fc;this[_0x2708dd('0x1a')]=this[_0x2708dd('0x1a')]?this[_0x2708dd('0x1a')]['finally'](_0x3a4e22):_0x3a4e22();};const Migration=function(_0x267538){const _0x2978a7=_0xf473fc;this[_0x2978a7('0xd')]=_0x267538,this[_0x2978a7('0x25')]=new Sequence();};Migration['prototype'][_0xf473fc('0x2b')]=function(_0x2dfaaa,_0x37085a,_0xec462){const _0x440dc0=_0xf473fc,_0x30d923=this;this[_0x440dc0('0x25')][_0x440dc0('0x2')](function(){const _0x4185ab=_0x440dc0;return _0x30d923[_0x4185ab('0xd')][_0x4185ab('0x2b')](_0x2dfaaa,_0x37085a,_0xec462)[_0x4185ab('0x4')](function(){const _0x42eade=_0x4185ab;logger[_0x42eade('0x18')](_0x42eade('0x23'),_0x37085a,_0x2dfaaa);})['catch'](function(_0x248ba2){const _0x17b656=_0x4185ab;logger[_0x17b656('0x18')](JSON[_0x17b656('0x1c')](_0x248ba2));});});},Migration['prototype'][_0xf473fc('0x17')]=function(_0x21ed1e,_0x471569,_0x476fcf){const _0x21dc6f=_0xf473fc,_0x2f2de3=this;this[_0x21dc6f('0x25')][_0x21dc6f('0x2')](function(){const _0x3ba6bd=_0x21dc6f;return _0x2f2de3[_0x3ba6bd('0xd')]['addColumn'](_0x21ed1e,_0x471569,_0x476fcf)['then'](function(){const _0x24a454=_0x3ba6bd;logger['info'](_0x24a454('0x26'),_0x471569,_0x21ed1e);})[_0x3ba6bd('0x1e')](function(_0x3041f0){const _0x258019=_0x3ba6bd;logger['info'](JSON[_0x258019('0x1c')](_0x3041f0));});});},Migration['prototype']['dropTable']=function(_0x3ffc24){const _0x3b813e=_0xf473fc,_0x49ffab=this;this[_0x3b813e('0x25')][_0x3b813e('0x2')](function(){const _0x1ef3cb=_0x3b813e;return _0x49ffab['queryInterface'][_0x1ef3cb('0x7')](_0x3ffc24,{'force':!![]})[_0x1ef3cb('0x4')](function(){const _0x1de792=_0x1ef3cb;logger[_0x1de792('0x18')](_0x1de792('0x14'),_0x3ffc24);})[_0x1ef3cb('0x1e')](function(_0x3ad88){const _0x559512=_0x1ef3cb;logger['info'](JSON[_0x559512('0x1c')](_0x3ad88));});});},Migration[_0xf473fc('0x8')][_0xf473fc('0x1f')]=function(_0x460ce7,_0x4ab7cd,_0x2c34ab){const _0x557b3b=_0xf473fc,_0x47664a=this;this[_0x557b3b('0x25')]['enqueue'](function(){const _0xd57377=_0x557b3b;return _0x47664a[_0xd57377('0xd')]['addIndex'](_0x460ce7,_0x4ab7cd,{'indexName':_0x2c34ab})['then'](function(){const _0x148b49=_0xd57377;logger[_0x148b49('0x18')]('addIndex\x20%s\x20%s\x20%s',_0x460ce7,_0x4ab7cd['join'](','),_0x2c34ab);})['catch'](function(_0x42f4a9){const _0x2370c5=_0xd57377;logger[_0x2370c5('0x18')](JSON[_0x2370c5('0x1c')](_0x42f4a9));});});},Migration[_0xf473fc('0x8')]['query']=function(_0x132e2f){const _0x4c58a7=_0xf473fc,_0x207438=this;this[_0x4c58a7('0x25')][_0x4c58a7('0x2')](function(){const _0x1c5b87=_0x4c58a7;return _0x207438[_0x1c5b87('0xd')][_0x1c5b87('0x29')][_0x1c5b87('0x3')](_0x132e2f)[_0x1c5b87('0x4')](function(){const _0x3839cf=_0x1c5b87;logger[_0x3839cf('0x18')](_0x3839cf('0x12'),_0x132e2f);})[_0x1c5b87('0x1e')](function(_0x4ae420){const _0x203c14=_0x1c5b87;logger[_0x203c14('0x18')](JSON[_0x203c14('0x1c')](_0x4ae420));});});},Migration['prototype'][_0xf473fc('0x28')]=function(_0x144e82,_0x20ec13){const _0x5e07d3=_0xf473fc,_0x72b61b=this;this[_0x5e07d3('0x25')][_0x5e07d3('0x2')](function(){const _0x1c6118=_0x5e07d3;return _0x72b61b['queryInterface']['removeColumn'](_0x144e82,_0x20ec13)[_0x1c6118('0x4')](function(){logger['info']('Removed\x20column\x20%s\x20from\x20%s',_0x20ec13,_0x144e82);})[_0x1c6118('0x1e')](function(_0x5986dd){const _0x57418f=_0x1c6118;logger[_0x57418f('0x18')](util[_0x57418f('0x24')](_0x5986dd,{'showHidden':![],'depth':null}));});});},Migration[_0xf473fc('0x8')][_0xf473fc('0x10')]=function(_0x11c3ad,_0x391a3c,_0x4bcbaa){const _0x3f59f4=_0xf473fc,_0x2600fe=this;this[_0x3f59f4('0x25')][_0x3f59f4('0x2')](function(){const _0x46a9e3=_0x3f59f4;return _0x2600fe['queryInterface'][_0x46a9e3('0x10')](_0x11c3ad,_0x391a3c,_0x4bcbaa)[_0x46a9e3('0x4')](function(){const _0x58d43b=_0x46a9e3;logger['info'](_0x58d43b('0x2a'),_0x391a3c,_0x4bcbaa,_0x11c3ad);})[_0x46a9e3('0x1e')](function(_0x20d218){const _0x27b277=_0x46a9e3;logger[_0x27b277('0x18')](util[_0x27b277('0x24')](_0x20d218,{'showHidden':![],'depth':null}));});});},Migration[_0xf473fc('0x8')]['final']=function(_0x4516be){const _0x513df3=_0xf473fc;this[_0x513df3('0x25')][_0x513df3('0x2')](function(){return _0x4516be();});},module[_0xf473fc('0x16')]={'up':function(_0x11b022,_0x19523a){return new Promise(function(_0x729e5f){const _0x4080e6=a939_0x3708,_0x2f25e2=new Migration(_0x11b022);_0x2f25e2['addColumn']('chat_websites',_0x4080e6('0xb'),{'type':_0x19523a['STRING'],'defaultValue':_0x4080e6('0xe')}),_0x2f25e2[_0x4080e6('0x17')](_0x4080e6('0x11'),_0x4080e6('0x0'),{'type':_0x19523a['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x2f25e2[_0x4080e6('0x28')]('chat_interactions','openedBy'),_0x2f25e2['removeColumn'](_0x4080e6('0xa'),_0x4080e6('0x1b')),_0x2f25e2['addColumn'](_0x4080e6('0xa'),_0x4080e6('0x1d'),{'type':_0x19523a[_0x4080e6('0x13')](_0x4080e6('0xf'))}),_0x2f25e2[_0x4080e6('0x28')](_0x4080e6('0x9'),_0x4080e6('0x1b')),_0x2f25e2[_0x4080e6('0x28')](_0x4080e6('0x21'),_0x4080e6('0x1b')),_0x2f25e2[_0x4080e6('0x28')](_0x4080e6('0x2c'),'openedBy'),_0x2f25e2[_0x4080e6('0x17')](_0x4080e6('0x2c'),'from',{'type':_0x19523a[_0x4080e6('0x27')]}),_0x2f25e2[_0x4080e6('0x17')]('mail_accounts',_0x4080e6('0x0'),{'type':_0x19523a['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x2f25e2['addColumn']('openchannel_accounts','waitForTheAssignedAgent',{'type':_0x19523a[_0x4080e6('0x1')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x2f25e2[_0x4080e6('0x17')](_0x4080e6('0x15'),'waitForTheAssignedAgent',{'type':_0x19523a[_0x4080e6('0x1')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x2f25e2[_0x4080e6('0x17')](_0x4080e6('0x5'),_0x4080e6('0x0'),{'type':_0x19523a[_0x4080e6('0x1')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x2f25e2[_0x4080e6('0x17')]('users',_0x4080e6('0xc'),{'type':_0x19523a['BOOLEAN'],'defaultValue':![]}),_0x2f25e2[_0x4080e6('0x22')](_0x729e5f);});},'down':function(){}};