Built motion from commit 5fcd269f5146f10cf3129722d518881dfac64576. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.33.js
1 const a911_0x5419=['util','acceptUrl','chat_interactions','closingMessage','catch','fax_interactions','info','rejectMethod','agentAlias','addIndex','removeColumn','closingMessageButton','actions','../config/logger','final','Added\x20column\x20%s\x20to\x20%s','mapKeyOffline','addIndex\x20%s\x20%s\x20%s','fax_attachments','tail','pathTranscript','timeout','cm_hopper','acceptMethod','fax_accounts','stringify','then','queue','#9f946a','user_has_fax_rooms','Changed\x20column\x20%s\x20in\x20table\x20%s','enqueue','star','queryInterface','assigned','team_has_fax_queues','fax_rooms','finally','BOOLEAN','chat_websites','addColumn','sequelize','user_has_fax_interactions','inspect','query','fax_applications','fax_dispositions','STRING','TEXT','priority','email','user_has_chat_queues','dropTable','forwardOfflineAddress','ratingType','sequence','ratingValue','join','fax_queues','fidelity','user_has_fax_queues','closeUrl','changeColumn','INTEGER','color','prototype'];(function(_0xe5e99c,_0x541958){const _0x2f4e5c=function(_0xe68756){while(--_0xe68756){_0xe5e99c['push'](_0xe5e99c['shift']());}};_0x2f4e5c(++_0x541958);}(a911_0x5419,0x12b));const a911_0x2f4e=function(_0xe5e99c,_0x541958){_0xe5e99c=_0xe5e99c-0x0;let _0x2f4e5c=a911_0x5419[_0xe5e99c];return _0x2f4e5c;};const _0x5e7f57=a911_0x2f4e;'use strict';const logger=require(_0x5e7f57('0x2c'))('migration'),util=require(_0x5e7f57('0x1f')),Sequence=function(){};Sequence[_0x5e7f57('0x1e')][_0x5e7f57('0x3e')]=function(_0xe68756){const _0x6e5d2b=_0x5e7f57;this[_0x6e5d2b('0x32')]=this[_0x6e5d2b('0x32')]?this[_0x6e5d2b('0x32')][_0x6e5d2b('0x2')](_0xe68756):_0xe68756();};const Migration=function(_0x9ca4e0){const _0x45581c=_0x5e7f57;this[_0x45581c('0x40')]=_0x9ca4e0,this[_0x45581c('0x14')]=new Sequence();};Migration['prototype'][_0x5e7f57('0x1b')]=function(_0x419749,_0x55baba,_0x19f9e0){const _0x41762d=_0x5e7f57,_0x142b3c=this;this['sequence'][_0x41762d('0x3e')](function(){const _0x50673e=_0x41762d;return _0x142b3c[_0x50673e('0x40')]['changeColumn'](_0x419749,_0x55baba,_0x19f9e0)[_0x50673e('0x39')](function(){const _0x2da4e9=_0x50673e;logger[_0x2da4e9('0x25')](_0x2da4e9('0x3d'),_0x55baba,_0x419749);})[_0x50673e('0x23')](function(_0x532edb){const _0x15ba62=_0x50673e;logger[_0x15ba62('0x25')](JSON['stringify'](_0x532edb));});});},Migration[_0x5e7f57('0x1e')][_0x5e7f57('0x5')]=function(_0x3404d3,_0x2530ff,_0x540a00){const _0x1ddca9=this;this['sequence']['enqueue'](function(){const _0x50a7db=a911_0x2f4e;return _0x1ddca9[_0x50a7db('0x40')][_0x50a7db('0x5')](_0x3404d3,_0x2530ff,_0x540a00)[_0x50a7db('0x39')](function(){const _0x4679de=_0x50a7db;logger['info'](_0x4679de('0x2e'),_0x2530ff,_0x3404d3);})[_0x50a7db('0x23')](function(_0x28f578){const _0x5f34c0=_0x50a7db;logger[_0x5f34c0('0x25')](JSON[_0x5f34c0('0x38')](_0x28f578));});});},Migration[_0x5e7f57('0x1e')]['dropTable']=function(_0x1bc1e8){const _0x122538=_0x5e7f57,_0x396125=this;this['sequence'][_0x122538('0x3e')](function(){const _0x2d264e=_0x122538;return _0x396125[_0x2d264e('0x40')][_0x2d264e('0x11')](_0x1bc1e8,{'force':!![]})['then'](function(){const _0x2143ab=_0x2d264e;logger[_0x2143ab('0x25')]('table\x20dropped\x20%s',_0x1bc1e8);})['catch'](function(_0x36e804){const _0x196311=_0x2d264e;logger[_0x196311('0x25')](JSON[_0x196311('0x38')](_0x36e804));});});},Migration[_0x5e7f57('0x1e')]['addIndex']=function(_0x3fe40c,_0x301cb3,_0x115c40){const _0x765974=_0x5e7f57,_0x12f910=this;this[_0x765974('0x14')][_0x765974('0x3e')](function(){const _0x332e7c=_0x765974;return _0x12f910[_0x332e7c('0x40')][_0x332e7c('0x28')](_0x3fe40c,_0x301cb3,{'indexName':_0x115c40})[_0x332e7c('0x39')](function(){const _0x58c2ad=_0x332e7c;logger[_0x58c2ad('0x25')](_0x58c2ad('0x30'),_0x3fe40c,_0x301cb3[_0x58c2ad('0x16')](','),_0x115c40);})[_0x332e7c('0x23')](function(_0x1722ec){logger['info'](JSON['stringify'](_0x1722ec));});});},Migration[_0x5e7f57('0x1e')][_0x5e7f57('0x9')]=function(_0x5b9dd4){const _0xc1839f=_0x5e7f57,_0x17cca5=this;this[_0xc1839f('0x14')]['enqueue'](function(){const _0xec9d16=_0xc1839f;return _0x17cca5[_0xec9d16('0x40')][_0xec9d16('0x6')][_0xec9d16('0x9')](_0x5b9dd4)[_0xec9d16('0x39')](function(){const _0x34b0dc=_0xec9d16;logger[_0x34b0dc('0x25')]('query\x20%s',_0x5b9dd4);})[_0xec9d16('0x23')](function(_0x27b253){const _0x195bcf=_0xec9d16;logger['info'](JSON[_0x195bcf('0x38')](_0x27b253));});});},Migration[_0x5e7f57('0x1e')][_0x5e7f57('0x29')]=function(_0x4cd89c,_0x255c65){const _0x5b2dc1=this;this['sequence']['enqueue'](function(){const _0x3544a4=a911_0x2f4e;return _0x5b2dc1[_0x3544a4('0x40')][_0x3544a4('0x29')](_0x4cd89c,_0x255c65)[_0x3544a4('0x39')](function(){const _0x45f86d=_0x3544a4;logger[_0x45f86d('0x25')]('Removed\x20column\x20%s\x20from\x20%s',_0x255c65,_0x4cd89c);})[_0x3544a4('0x23')](function(_0x368c45){const _0x19a33d=_0x3544a4;logger[_0x19a33d('0x25')](util[_0x19a33d('0x8')](_0x368c45,{'showHidden':![],'depth':null}));});});},Migration[_0x5e7f57('0x1e')][_0x5e7f57('0x2d')]=function(_0x360bca){const _0x4f5fce=_0x5e7f57;this['sequence'][_0x4f5fce('0x3e')](function(){return _0x360bca();});},module['exports']={'up':function(_0x137d43,_0x31b699){return new Promise(function(_0x4539d7){const _0x4426b0=a911_0x2f4e,_0x31f218=new Migration(_0x137d43);_0x31f218[_0x4426b0('0x5')](_0x4426b0('0x4'),_0x4426b0('0x27'),{'type':_0x31b699[_0x4426b0('0xc')],'defaultValue':'Agent'}),_0x31f218[_0x4426b0('0x5')](_0x4426b0('0x4'),_0x4426b0('0x2f'),{'type':_0x31b699[_0x4426b0('0xc')],'defaultValue':_0x4426b0('0xf')}),_0x31f218[_0x4426b0('0x5')]('chat_websites','sitepic',{'type':_0x31b699['TEXT']}),_0x31f218[_0x4426b0('0x5')]('chat_websites',_0x4426b0('0x22'),{'type':_0x31b699[_0x4426b0('0xd')]}),_0x31f218['addColumn'](_0x4426b0('0x4'),_0x4426b0('0x2a'),{'type':_0x31b699[_0x4426b0('0xc')],'defaultValue':'Send'}),_0x31f218['addColumn']('chat_websites','enableRating',{'type':_0x31b699[_0x4426b0('0x3')],'defaultValue':![]}),_0x31f218[_0x4426b0('0x5')](_0x4426b0('0x4'),_0x4426b0('0x13'),{'type':_0x31b699['ENUM'](_0x4426b0('0x3f'),'thumb'),'defaultValue':_0x4426b0('0x3f')}),_0x31f218[_0x4426b0('0x5')]('chat_websites','ratingStarsNumber',{'type':_0x31b699[_0x4426b0('0x1c')],'defaultValue':0x5}),_0x31f218[_0x4426b0('0x5')]('chat_interactions',_0x4426b0('0x15'),{'type':_0x31b699['INTEGER']}),_0x31f218[_0x4426b0('0x5')](_0x4426b0('0x21'),'ratingMessage',{'type':_0x31b699['TEXT']}),_0x31f218[_0x4426b0('0x5')](_0x4426b0('0x21'),_0x4426b0('0x33'),{'type':_0x31b699[_0x4426b0('0xd')]}),_0x31f218[_0x4426b0('0x5')](_0x4426b0('0x21'),'mailTranscript',{'type':_0x31b699[_0x4426b0('0xc')]}),_0x31f218['addColumn'](_0x4426b0('0x4'),'forwardTranscript',{'type':_0x31b699[_0x4426b0('0x3')],'defaultValue':![]}),_0x31f218[_0x4426b0('0x5')](_0x4426b0('0x4'),'forwardOffline',{'type':_0x31b699[_0x4426b0('0x3')],'defaultValue':![]}),_0x31f218[_0x4426b0('0x5')](_0x4426b0('0x4'),_0x4426b0('0x12'),{'type':_0x31b699['STRING'],'validate':{'isEmail':!![]}}),_0x31f218[_0x4426b0('0x1b')](_0x4426b0('0x4'),_0x4426b0('0x1d'),{'type':_0x31b699[_0x4426b0('0xc')],'allowNull':![],'defaultValue':_0x4426b0('0x3b')}),_0x31f218[_0x4426b0('0x1b')](_0x4426b0('0x4'),'color_button',{'type':_0x31b699[_0x4426b0('0xc')],'allowNull':![],'defaultValue':'#9f946a'}),_0x31f218[_0x4426b0('0x11')](_0x4426b0('0x31')),_0x31f218[_0x4426b0('0x11')](_0x4426b0('0x3c')),_0x31f218[_0x4426b0('0x11')](_0x4426b0('0x1')),_0x31f218[_0x4426b0('0x11')]('fax_messages'),_0x31f218[_0x4426b0('0x11')](_0x4426b0('0xb')),_0x31f218[_0x4426b0('0x11')](_0x4426b0('0xa')),_0x31f218['dropTable'](_0x4426b0('0x7')),_0x31f218[_0x4426b0('0x11')](_0x4426b0('0x24')),_0x31f218[_0x4426b0('0x11')](_0x4426b0('0x0')),_0x31f218[_0x4426b0('0x11')](_0x4426b0('0x19')),_0x31f218[_0x4426b0('0x11')](_0x4426b0('0x17')),_0x31f218[_0x4426b0('0x29')]('fax_accounts',_0x4426b0('0x18')),_0x31f218[_0x4426b0('0x29')](_0x4426b0('0x37'),_0x4426b0('0x34')),_0x31f218[_0x4426b0('0x29')](_0x4426b0('0x37'),_0x4426b0('0x20')),_0x31f218[_0x4426b0('0x29')](_0x4426b0('0x37'),'rejectUrl'),_0x31f218[_0x4426b0('0x29')](_0x4426b0('0x37'),_0x4426b0('0x36')),_0x31f218[_0x4426b0('0x29')]('fax_accounts',_0x4426b0('0x26')),_0x31f218[_0x4426b0('0x29')](_0x4426b0('0x37'),_0x4426b0('0x2b')),_0x31f218['removeColumn'](_0x4426b0('0x37'),_0x4426b0('0x1a')),_0x31f218[_0x4426b0('0x29')]('fax_accounts','closeMethod'),_0x31f218['removeColumn'](_0x4426b0('0x10'),_0x4426b0('0x41')),_0x31f218['removeColumn'](_0x4426b0('0x10'),'queue'),_0x31f218[_0x4426b0('0x29')]('user_has_openchannel_queues',_0x4426b0('0x41')),_0x31f218[_0x4426b0('0x29')]('user_has_openchannel_queues',_0x4426b0('0x3a')),_0x31f218[_0x4426b0('0x5')](_0x4426b0('0x35'),'priority',{'type':_0x31b699[_0x4426b0('0x1c')](0x2)['UNSIGNED'],'defaultValue':0x2}),_0x31f218[_0x4426b0('0x28')]('cm_hopper',[_0x4426b0('0xe')],_0x4426b0('0xe')),_0x31f218[_0x4426b0('0x11')]('sms_messages'),_0x31f218[_0x4426b0('0x2d')](_0x4539d7);});},'down':function(){}};