Built motion from commit 5fcd269f5146f10cf3129722d518881dfac64576. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.60.js
1 const a938_0x184f=['util','table\x20dropped\x20%s','website_alias','fax_accounts','addIndex','TEXT','then','STRING','long','openchannel_accounts','migration','dropTable','Added\x20column\x20%s\x20to\x20%s','prototype','query\x20%s','phoneBarEnableJaws','chat_websites','renameColumn','exports','join','tail','catch','addColumn','changeColumn','INTEGER','sms_interactions','from','Removed\x20column\x20%s\x20from\x20%s','queryInterface','addIndex\x20%s\x20%s\x20%s','openedBy','fax_interactions','query','info','../config/logger','mail_interactions','enqueue','mail_accounts','inspect','removeColumn','lastMsgBody','finally','stringify','waitForTheAssignedAgent','BOOLEAN','sequence','final','agentIdentifier','openchannel_interactions'];(function(_0x35f56d,_0x184f4b){const _0x3308b9=function(_0x41d96f){while(--_0x41d96f){_0x35f56d['push'](_0x35f56d['shift']());}};_0x3308b9(++_0x184f4b);}(a938_0x184f,0x1be));const a938_0x3308=function(_0x35f56d,_0x184f4b){_0x35f56d=_0x35f56d-0x0;let _0x3308b9=a938_0x184f[_0x35f56d];return _0x3308b9;};const _0x39d873=a938_0x3308;'use strict';const util=require(_0x39d873('0x2c')),logger=require(_0x39d873('0x1d'))(_0x39d873('0x5')),Sequence=function(){};Sequence[_0x39d873('0x8')][_0x39d873('0x1f')]=function(_0x41d96f){const _0x28f498=_0x39d873;this[_0x28f498('0xf')]=this['tail']?this['tail'][_0x28f498('0x24')](_0x41d96f):_0x41d96f();};const Migration=function(_0x8029f3){const _0x1ab8c3=_0x39d873;this['queryInterface']=_0x8029f3,this[_0x1ab8c3('0x28')]=new Sequence();};Migration[_0x39d873('0x8')][_0x39d873('0x12')]=function(_0x356d98,_0x953901,_0x148bdd){const _0x5f0764=_0x39d873,_0x1f377b=this;this['sequence'][_0x5f0764('0x1f')](function(){const _0x5bdb4c=_0x5f0764;return _0x1f377b[_0x5bdb4c('0x17')][_0x5bdb4c('0x12')](_0x356d98,_0x953901,_0x148bdd)[_0x5bdb4c('0x1')](function(){const _0x26f5e7=_0x5bdb4c;logger[_0x26f5e7('0x1c')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x953901,_0x356d98);})[_0x5bdb4c('0x10')](function(_0x29c86d){logger['info'](JSON['stringify'](_0x29c86d));});});},Migration['prototype'][_0x39d873('0x11')]=function(_0x28dfe5,_0x4f1f86,_0x4fb0c3){const _0x1f7b81=_0x39d873,_0x4816f2=this;this[_0x1f7b81('0x28')][_0x1f7b81('0x1f')](function(){const _0x41effa=_0x1f7b81;return _0x4816f2[_0x41effa('0x17')][_0x41effa('0x11')](_0x28dfe5,_0x4f1f86,_0x4fb0c3)[_0x41effa('0x1')](function(){const _0x348a72=_0x41effa;logger[_0x348a72('0x1c')](_0x348a72('0x7'),_0x4f1f86,_0x28dfe5);})[_0x41effa('0x10')](function(_0x3c5851){const _0x5d3e8f=_0x41effa;logger[_0x5d3e8f('0x1c')](JSON[_0x5d3e8f('0x25')](_0x3c5851));});});},Migration[_0x39d873('0x8')][_0x39d873('0x6')]=function(_0x4740ba){const _0x2c466d=_0x39d873,_0x302d41=this;this['sequence'][_0x2c466d('0x1f')](function(){const _0x213f6c=_0x2c466d;return _0x302d41[_0x213f6c('0x17')][_0x213f6c('0x6')](_0x4740ba,{'force':!![]})['then'](function(){const _0x579738=_0x213f6c;logger[_0x579738('0x1c')](_0x579738('0x2d'),_0x4740ba);})[_0x213f6c('0x10')](function(_0x2c3d2c){const _0xfdb181=_0x213f6c;logger[_0xfdb181('0x1c')](JSON[_0xfdb181('0x25')](_0x2c3d2c));});});},Migration[_0x39d873('0x8')][_0x39d873('0x30')]=function(_0x4c5782,_0x5791b9,_0x579dd2){const _0x5deded=_0x39d873,_0x3b2813=this;this['sequence'][_0x5deded('0x1f')](function(){const _0xf622db=_0x5deded;return _0x3b2813[_0xf622db('0x17')][_0xf622db('0x30')](_0x4c5782,_0x5791b9,{'indexName':_0x579dd2})['then'](function(){const _0x517e70=_0xf622db;logger[_0x517e70('0x1c')](_0x517e70('0x18'),_0x4c5782,_0x5791b9[_0x517e70('0xe')](','),_0x579dd2);})['catch'](function(_0x3620be){const _0x19bead=_0xf622db;logger['info'](JSON[_0x19bead('0x25')](_0x3620be));});});},Migration[_0x39d873('0x8')][_0x39d873('0x1b')]=function(_0x251ac6){const _0x4aef6a=_0x39d873,_0x2fcd5b=this;this[_0x4aef6a('0x28')]['enqueue'](function(){const _0x11eafb=_0x4aef6a;return _0x2fcd5b[_0x11eafb('0x17')]['sequelize']['query'](_0x251ac6)[_0x11eafb('0x1')](function(){const _0x1135ca=_0x11eafb;logger[_0x1135ca('0x1c')](_0x1135ca('0x9'),_0x251ac6);})[_0x11eafb('0x10')](function(_0x37c11f){const _0x4f6bea=_0x11eafb;logger[_0x4f6bea('0x1c')](JSON['stringify'](_0x37c11f));});});},Migration['prototype'][_0x39d873('0x22')]=function(_0xafa310,_0x142b12){const _0x523bf1=_0x39d873,_0x5da3c8=this;this[_0x523bf1('0x28')][_0x523bf1('0x1f')](function(){const _0x4086c3=_0x523bf1;return _0x5da3c8[_0x4086c3('0x17')][_0x4086c3('0x22')](_0xafa310,_0x142b12)['then'](function(){const _0x4ab8b4=_0x4086c3;logger[_0x4ab8b4('0x1c')](_0x4ab8b4('0x16'),_0x142b12,_0xafa310);})['catch'](function(_0x39afc6){const _0x1e9f8c=_0x4086c3;logger[_0x1e9f8c('0x1c')](util[_0x1e9f8c('0x21')](_0x39afc6,{'showHidden':![],'depth':null}));});});},Migration[_0x39d873('0x8')][_0x39d873('0xc')]=function(_0x149202,_0x559c9d,_0x237630){const _0x30a33e=_0x39d873,_0x33146d=this;this['sequence'][_0x30a33e('0x1f')](function(){const _0x1252e6=_0x30a33e;return _0x33146d[_0x1252e6('0x17')][_0x1252e6('0xc')](_0x149202,_0x559c9d,_0x237630)[_0x1252e6('0x1')](function(){const _0x42ee66=_0x1252e6;logger[_0x42ee66('0x1c')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x559c9d,_0x237630,_0x149202);})[_0x1252e6('0x10')](function(_0x4aae69){const _0x12ea63=_0x1252e6;logger[_0x12ea63('0x1c')](util[_0x12ea63('0x21')](_0x4aae69,{'showHidden':![],'depth':null}));});});},Migration[_0x39d873('0x8')][_0x39d873('0x29')]=function(_0x22211f){const _0x58f177=_0x39d873;this[_0x58f177('0x28')][_0x58f177('0x1f')](function(){return _0x22211f();});},module[_0x39d873('0xd')]={'up':function(_0x4ecb80,_0x1791ae){return new Promise(function(_0x5211bb){const _0x93b0fb=a938_0x3308,_0x11b36e=new Migration(_0x4ecb80);_0x11b36e['addColumn']('chat_websites',_0x93b0fb('0x2a'),{'type':_0x1791ae[_0x93b0fb('0x2')],'defaultValue':_0x93b0fb('0x2e')}),_0x11b36e[_0x93b0fb('0x11')](_0x93b0fb('0xb'),_0x93b0fb('0x26'),{'type':_0x1791ae['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x11b36e[_0x93b0fb('0x22')]('chat_interactions','openedBy'),_0x11b36e[_0x93b0fb('0x22')](_0x93b0fb('0x1e'),_0x93b0fb('0x19')),_0x11b36e[_0x93b0fb('0x11')](_0x93b0fb('0x1e'),_0x93b0fb('0x23'),{'type':_0x1791ae[_0x93b0fb('0x0')](_0x93b0fb('0x3'))}),_0x11b36e['removeColumn'](_0x93b0fb('0x14'),_0x93b0fb('0x19')),_0x11b36e['removeColumn'](_0x93b0fb('0x1a'),_0x93b0fb('0x19')),_0x11b36e[_0x93b0fb('0x22')](_0x93b0fb('0x2b'),_0x93b0fb('0x19')),_0x11b36e['addColumn'](_0x93b0fb('0x2b'),_0x93b0fb('0x15'),{'type':_0x1791ae[_0x93b0fb('0x2')]}),_0x11b36e[_0x93b0fb('0x11')](_0x93b0fb('0x20'),_0x93b0fb('0x26'),{'type':_0x1791ae[_0x93b0fb('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x11b36e[_0x93b0fb('0x11')](_0x93b0fb('0x4'),_0x93b0fb('0x26'),{'type':_0x1791ae[_0x93b0fb('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x11b36e[_0x93b0fb('0x11')](_0x93b0fb('0x2f'),_0x93b0fb('0x26'),{'type':_0x1791ae[_0x93b0fb('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x11b36e[_0x93b0fb('0x11')]('sms_accounts',_0x93b0fb('0x26'),{'type':_0x1791ae[_0x93b0fb('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa}),_0x11b36e[_0x93b0fb('0x11')]('users',_0x93b0fb('0xa'),{'type':_0x1791ae[_0x93b0fb('0x27')],'defaultValue':![]}),_0x11b36e[_0x93b0fb('0x29')](_0x5211bb);});},'down':function(){}};