Built motion from commit f651e4b0a7312c0adceb5e57d6684a801a3aaf0d. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.33.js
1 const a912_0x3dd5=['chat_interactions','join','fax_interactions','fax_queues','ratingMessage','actions','mapKeyOffline','sequelize','info','catch','addIndex','agentAlias','dropTable','UNSIGNED','ratingType','cm_hopper','sitepic','rejectUrl','TEXT','enqueue','priority','STRING','closeMethod','acceptMethod','addIndex\x20%s\x20%s\x20%s','Send','timeout','addColumn','email','final','#9f946a','user_has_fax_interactions','forwardOffline','ratingValue','assigned','prototype','fax_dispositions','removeColumn','queue','Added\x20column\x20%s\x20to\x20%s','rejectMethod','migration','sequence','thumb','closeUrl','color_button','team_has_fax_queues','fax_applications','forwardTranscript','mailTranscript','user_has_chat_queues','stringify','acceptUrl','closingMessage','util','ENUM','BOOLEAN','tail','enableRating','fax_attachments','query','query\x20%s','user_has_openchannel_queues','fax_rooms','queryInterface','Changed\x20column\x20%s\x20in\x20table\x20%s','INTEGER','changeColumn','Agent','chat_websites','star','fax_accounts','closingMessageButton','then'];(function(_0x143ae3,_0x3dd5c4){const _0x764940=function(_0x57097a){while(--_0x57097a){_0x143ae3['push'](_0x143ae3['shift']());}};_0x764940(++_0x3dd5c4);}(a912_0x3dd5,0x14c));const a912_0x7649=function(_0x143ae3,_0x3dd5c4){_0x143ae3=_0x143ae3-0x0;let _0x764940=a912_0x3dd5[_0x143ae3];return _0x764940;};const _0x3876e7=a912_0x7649;'use strict';const logger=require('../config/logger')(_0x3876e7('0x5')),util=require(_0x3876e7('0x12')),Sequence=function(){};Sequence[_0x3876e7('0x49')][_0x3876e7('0x39')]=function(_0x57097a){const _0x17fdcf=_0x3876e7;this[_0x17fdcf('0x15')]=this[_0x17fdcf('0x15')]?this[_0x17fdcf('0x15')]['finally'](_0x57097a):_0x57097a();};const Migration=function(_0x5d4d6a){const _0x4acb8a=_0x3876e7;this[_0x4acb8a('0x1c')]=_0x5d4d6a,this[_0x4acb8a('0x6')]=new Sequence();};Migration[_0x3876e7('0x49')][_0x3876e7('0x1f')]=function(_0x425eea,_0x122fc7,_0x2fafc8){const _0x13e3f0=_0x3876e7,_0x404601=this;this[_0x13e3f0('0x6')][_0x13e3f0('0x39')](function(){const _0x139082=_0x13e3f0;return _0x404601[_0x139082('0x1c')][_0x139082('0x1f')](_0x425eea,_0x122fc7,_0x2fafc8)['then'](function(){const _0x5c991e=_0x139082;logger[_0x5c991e('0x2e')](_0x5c991e('0x1d'),_0x122fc7,_0x425eea);})['catch'](function(_0x2d6727){const _0x1c8856=_0x139082;logger[_0x1c8856('0x2e')](JSON['stringify'](_0x2d6727));});});},Migration['prototype'][_0x3876e7('0x41')]=function(_0x7018b7,_0x502916,_0x706281){const _0xcee195=_0x3876e7,_0xe34c3=this;this['sequence'][_0xcee195('0x39')](function(){const _0x279fd6=_0xcee195;return _0xe34c3[_0x279fd6('0x1c')][_0x279fd6('0x41')](_0x7018b7,_0x502916,_0x706281)['then'](function(){const _0x43afc3=_0x279fd6;logger[_0x43afc3('0x2e')](_0x43afc3('0x3'),_0x502916,_0x7018b7);})['catch'](function(_0x1ea0ff){const _0x43e532=_0x279fd6;logger[_0x43e532('0x2e')](JSON[_0x43e532('0xf')](_0x1ea0ff));});});},Migration['prototype'][_0x3876e7('0x32')]=function(_0x356d88){const _0x58701b=_0x3876e7,_0x33a8de=this;this[_0x58701b('0x6')]['enqueue'](function(){const _0x5c841b=_0x58701b;return _0x33a8de[_0x5c841b('0x1c')][_0x5c841b('0x32')](_0x356d88,{'force':!![]})[_0x5c841b('0x25')](function(){const _0xed6288=_0x5c841b;logger[_0xed6288('0x2e')]('table\x20dropped\x20%s',_0x356d88);})[_0x5c841b('0x2f')](function(_0x25e138){const _0x21b7e1=_0x5c841b;logger['info'](JSON[_0x21b7e1('0xf')](_0x25e138));});});},Migration[_0x3876e7('0x49')][_0x3876e7('0x30')]=function(_0x426649,_0x5ea5f3,_0x5e9e6f){const _0x4be631=_0x3876e7,_0x55aac3=this;this[_0x4be631('0x6')][_0x4be631('0x39')](function(){const _0x35fa36=_0x4be631;return _0x55aac3['queryInterface']['addIndex'](_0x426649,_0x5ea5f3,{'indexName':_0x5e9e6f})[_0x35fa36('0x25')](function(){const _0x5e919b=_0x35fa36;logger[_0x5e919b('0x2e')](_0x5e919b('0x3e'),_0x426649,_0x5ea5f3[_0x5e919b('0x27')](','),_0x5e9e6f);})[_0x35fa36('0x2f')](function(_0x4fee6f){const _0x5086a3=_0x35fa36;logger[_0x5086a3('0x2e')](JSON['stringify'](_0x4fee6f));});});},Migration[_0x3876e7('0x49')][_0x3876e7('0x18')]=function(_0x300e3c){const _0x5bdb27=_0x3876e7,_0x5ea095=this;this[_0x5bdb27('0x6')][_0x5bdb27('0x39')](function(){const _0x471a05=_0x5bdb27;return _0x5ea095['queryInterface'][_0x471a05('0x2d')][_0x471a05('0x18')](_0x300e3c)[_0x471a05('0x25')](function(){const _0x54e210=_0x471a05;logger[_0x54e210('0x2e')](_0x54e210('0x19'),_0x300e3c);})[_0x471a05('0x2f')](function(_0x3fdc9e){const _0x25a6b9=_0x471a05;logger[_0x25a6b9('0x2e')](JSON[_0x25a6b9('0xf')](_0x3fdc9e));});});},Migration[_0x3876e7('0x49')]['removeColumn']=function(_0x4fb89b,_0x2a14ca){const _0x4b0e68=_0x3876e7,_0x1b61c2=this;this[_0x4b0e68('0x6')][_0x4b0e68('0x39')](function(){const _0x538d99=_0x4b0e68;return _0x1b61c2[_0x538d99('0x1c')][_0x538d99('0x1')](_0x4fb89b,_0x2a14ca)['then'](function(){const _0xda909f=_0x538d99;logger[_0xda909f('0x2e')]('Removed\x20column\x20%s\x20from\x20%s',_0x2a14ca,_0x4fb89b);})[_0x538d99('0x2f')](function(_0x1ab9f0){logger['info'](util['inspect'](_0x1ab9f0,{'showHidden':![],'depth':null}));});});},Migration['prototype']['final']=function(_0x4f9f7f){const _0x49f50c=_0x3876e7;this[_0x49f50c('0x6')][_0x49f50c('0x39')](function(){return _0x4f9f7f();});},module['exports']={'up':function(_0x32560,_0x32c597){return new Promise(function(_0x57bae5){const _0x35f410=a912_0x7649,_0x2ce18b=new Migration(_0x32560);_0x2ce18b[_0x35f410('0x41')](_0x35f410('0x21'),_0x35f410('0x31'),{'type':_0x32c597[_0x35f410('0x3b')],'defaultValue':_0x35f410('0x20')}),_0x2ce18b['addColumn'](_0x35f410('0x21'),_0x35f410('0x2c'),{'type':_0x32c597[_0x35f410('0x3b')],'defaultValue':_0x35f410('0x42')}),_0x2ce18b[_0x35f410('0x41')](_0x35f410('0x21'),_0x35f410('0x36'),{'type':_0x32c597[_0x35f410('0x38')]}),_0x2ce18b[_0x35f410('0x41')](_0x35f410('0x21'),_0x35f410('0x11'),{'type':_0x32c597[_0x35f410('0x38')]}),_0x2ce18b[_0x35f410('0x41')]('chat_websites',_0x35f410('0x24'),{'type':_0x32c597[_0x35f410('0x3b')],'defaultValue':_0x35f410('0x3f')}),_0x2ce18b[_0x35f410('0x41')]('chat_websites',_0x35f410('0x16'),{'type':_0x32c597[_0x35f410('0x14')],'defaultValue':![]}),_0x2ce18b[_0x35f410('0x41')]('chat_websites',_0x35f410('0x34'),{'type':_0x32c597[_0x35f410('0x13')](_0x35f410('0x22'),_0x35f410('0x7')),'defaultValue':_0x35f410('0x22')}),_0x2ce18b[_0x35f410('0x41')]('chat_websites','ratingStarsNumber',{'type':_0x32c597[_0x35f410('0x1e')],'defaultValue':0x5}),_0x2ce18b['addColumn']('chat_interactions',_0x35f410('0x47'),{'type':_0x32c597[_0x35f410('0x1e')]}),_0x2ce18b[_0x35f410('0x41')]('chat_interactions',_0x35f410('0x2a'),{'type':_0x32c597[_0x35f410('0x38')]}),_0x2ce18b[_0x35f410('0x41')](_0x35f410('0x26'),'pathTranscript',{'type':_0x32c597['TEXT']}),_0x2ce18b[_0x35f410('0x41')](_0x35f410('0x26'),_0x35f410('0xd'),{'type':_0x32c597[_0x35f410('0x3b')]}),_0x2ce18b[_0x35f410('0x41')](_0x35f410('0x21'),_0x35f410('0xc'),{'type':_0x32c597[_0x35f410('0x14')],'defaultValue':![]}),_0x2ce18b[_0x35f410('0x41')](_0x35f410('0x21'),_0x35f410('0x46'),{'type':_0x32c597[_0x35f410('0x14')],'defaultValue':![]}),_0x2ce18b[_0x35f410('0x41')]('chat_websites','forwardOfflineAddress',{'type':_0x32c597[_0x35f410('0x3b')],'validate':{'isEmail':!![]}}),_0x2ce18b[_0x35f410('0x1f')]('chat_websites','color',{'type':_0x32c597[_0x35f410('0x3b')],'allowNull':![],'defaultValue':'#9f946a'}),_0x2ce18b[_0x35f410('0x1f')](_0x35f410('0x21'),_0x35f410('0x9'),{'type':_0x32c597[_0x35f410('0x3b')],'allowNull':![],'defaultValue':_0x35f410('0x44')}),_0x2ce18b[_0x35f410('0x32')](_0x35f410('0x17')),_0x2ce18b[_0x35f410('0x32')]('user_has_fax_rooms'),_0x2ce18b[_0x35f410('0x32')](_0x35f410('0x1b')),_0x2ce18b['dropTable']('fax_messages'),_0x2ce18b['dropTable'](_0x35f410('0x0')),_0x2ce18b[_0x35f410('0x32')](_0x35f410('0xb')),_0x2ce18b[_0x35f410('0x32')](_0x35f410('0x45')),_0x2ce18b['dropTable'](_0x35f410('0x28')),_0x2ce18b['dropTable'](_0x35f410('0xa')),_0x2ce18b[_0x35f410('0x32')]('user_has_fax_queues'),_0x2ce18b[_0x35f410('0x32')](_0x35f410('0x29')),_0x2ce18b[_0x35f410('0x1')]('fax_accounts','fidelity'),_0x2ce18b['removeColumn'](_0x35f410('0x23'),_0x35f410('0x40')),_0x2ce18b[_0x35f410('0x1')](_0x35f410('0x23'),_0x35f410('0x10')),_0x2ce18b[_0x35f410('0x1')]('fax_accounts',_0x35f410('0x37')),_0x2ce18b[_0x35f410('0x1')]('fax_accounts',_0x35f410('0x3d')),_0x2ce18b[_0x35f410('0x1')]('fax_accounts',_0x35f410('0x4')),_0x2ce18b[_0x35f410('0x1')]('fax_accounts',_0x35f410('0x2b')),_0x2ce18b['removeColumn'](_0x35f410('0x23'),_0x35f410('0x8')),_0x2ce18b[_0x35f410('0x1')](_0x35f410('0x23'),_0x35f410('0x3c')),_0x2ce18b[_0x35f410('0x1')](_0x35f410('0xe'),_0x35f410('0x48')),_0x2ce18b['removeColumn']('user_has_chat_queues',_0x35f410('0x2')),_0x2ce18b[_0x35f410('0x1')](_0x35f410('0x1a'),_0x35f410('0x48')),_0x2ce18b[_0x35f410('0x1')](_0x35f410('0x1a'),_0x35f410('0x2')),_0x2ce18b['addColumn'](_0x35f410('0x35'),_0x35f410('0x3a'),{'type':_0x32c597[_0x35f410('0x1e')](0x2)[_0x35f410('0x33')],'defaultValue':0x2}),_0x2ce18b[_0x35f410('0x30')]('cm_hopper',[_0x35f410('0x3a')],_0x35f410('0x3a')),_0x2ce18b[_0x35f410('0x32')]('sms_messages'),_0x2ce18b[_0x35f410('0x43')](_0x57bae5);});},'down':function(){}};