56eb6744b91ba51686f2a67cab8d62e02afd82b0
[motion-next.git] / server / migrations / 2.3.7.js
1 const a980_0x3aa4=['inspect','transfertype','enqueue','report_call','removeIndex','STRING','systemanswertime','transfer','then','Added\x20column\x20%s\x20to\x20%s','sequelize','dropTable','sequence','queryInterface','FORWARD,\x20BLIND,\x20ATTENDED','Case','query','info','addIndex\x20%s\x20%s\x20%s','removeColumn','Changed\x20column\x20%s\x20in\x20table\x20%s','report_agent','catch','stringify','tail','transferexten','INTEGER','agententerreason','removeIndex\x20%s\x20%s','../config/logger','Task','table\x20dropped\x20%s','renameColumn','addIndex','finally','prototype','addColumn','join','query\x20%s','changeColumn','final','transferuniqueid','exports','Removed\x20column\x20%s\x20from\x20%s','migration'];(function(_0x40112c,_0x3aa4c6){const _0x18f5bb=function(_0x571666){while(--_0x571666){_0x40112c['push'](_0x40112c['shift']());}};_0x18f5bb(++_0x3aa4c6);}(a980_0x3aa4,0x1db));const a980_0x18f5=function(_0x40112c,_0x3aa4c6){_0x40112c=_0x40112c-0x0;let _0x18f5bb=a980_0x3aa4[_0x40112c];return _0x18f5bb;};const _0x1bcf0c=a980_0x18f5;'use strict';const util=require('util'),logger=require(_0x1bcf0c('0x4'))(_0x1bcf0c('0x13')),Sequence=function(){};Sequence['prototype'][_0x1bcf0c('0x16')]=function(_0x571666){const _0x1ed5a4=_0x1bcf0c;this[_0x1ed5a4('0x2c')]=this[_0x1ed5a4('0x2c')]?this[_0x1ed5a4('0x2c')][_0x1ed5a4('0x9')](_0x571666):_0x571666();};const Migration=function(_0x2acd89){const _0x3d3783=_0x1bcf0c;this[_0x3d3783('0x21')]=_0x2acd89,this['sequence']=new Sequence();};Migration[_0x1bcf0c('0xa')][_0x1bcf0c('0xe')]=function(_0x288627,_0x122a16,_0x363b05){const _0x1b64a2=_0x1bcf0c,_0x582231=this;this['sequence'][_0x1b64a2('0x16')](function(){const _0x263f05=_0x1b64a2;return _0x582231['queryInterface']['changeColumn'](_0x288627,_0x122a16,_0x363b05)['then'](function(){const _0x6f7ba4=a980_0x18f5;logger[_0x6f7ba4('0x25')](_0x6f7ba4('0x28'),_0x122a16,_0x288627);})[_0x263f05('0x2a')](function(_0x31c905){const _0x1236c7=_0x263f05;logger[_0x1236c7('0x25')](JSON[_0x1236c7('0x2b')](_0x31c905));});});},Migration[_0x1bcf0c('0xa')][_0x1bcf0c('0xb')]=function(_0x4f0a88,_0x5ae224,_0x433109){const _0x21cd02=_0x1bcf0c,_0x39af01=this;this[_0x21cd02('0x20')]['enqueue'](function(){const _0x40ff3e=_0x21cd02;return _0x39af01[_0x40ff3e('0x21')][_0x40ff3e('0xb')](_0x4f0a88,_0x5ae224,_0x433109)['then'](function(){const _0x6261c9=_0x40ff3e;logger[_0x6261c9('0x25')](_0x6261c9('0x1d'),_0x5ae224,_0x4f0a88);})[_0x40ff3e('0x2a')](function(_0x4a6547){const _0x1816b0=_0x40ff3e;logger['info'](JSON[_0x1816b0('0x2b')](_0x4a6547));});});},Migration['prototype'][_0x1bcf0c('0x1f')]=function(_0x3bae14){const _0x3c318a=_0x1bcf0c,_0x5be362=this;this[_0x3c318a('0x20')][_0x3c318a('0x16')](function(){const _0x244399=_0x3c318a;return _0x5be362[_0x244399('0x21')][_0x244399('0x1f')](_0x3bae14,{'force':!![]})[_0x244399('0x1c')](function(){const _0x290dd6=_0x244399;logger[_0x290dd6('0x25')](_0x290dd6('0x6'),_0x3bae14);})['catch'](function(_0x479e3f){const _0x4262a6=_0x244399;logger[_0x4262a6('0x25')](JSON[_0x4262a6('0x2b')](_0x479e3f));});});},Migration[_0x1bcf0c('0xa')][_0x1bcf0c('0x8')]=function(_0xce7dd8,_0x65dbd1,_0x462746){const _0x3b74a3=_0x1bcf0c,_0x1e260f=this;this[_0x3b74a3('0x20')]['enqueue'](function(){const _0x17749b=_0x3b74a3;return _0x1e260f[_0x17749b('0x21')]['addIndex'](_0xce7dd8,_0x65dbd1,{'indexName':_0x462746})[_0x17749b('0x1c')](function(){const _0x2382be=_0x17749b;logger['info'](_0x2382be('0x26'),_0xce7dd8,_0x65dbd1[_0x2382be('0xc')](','),_0x462746);})[_0x17749b('0x2a')](function(_0x382e2f){const _0x42b05a=_0x17749b;logger['info'](JSON[_0x42b05a('0x2b')](_0x382e2f));});});},Migration[_0x1bcf0c('0xa')]['removeIndex']=function(_0x200f8e,_0x42c1d5){const _0x2b914f=_0x1bcf0c,_0x4b8c59=this;this[_0x2b914f('0x20')][_0x2b914f('0x16')](function(){const _0x3dffd4=_0x2b914f;return _0x4b8c59['queryInterface'][_0x3dffd4('0x18')](_0x200f8e,_0x42c1d5)['then'](function(){const _0x3a390b=_0x3dffd4;logger[_0x3a390b('0x25')](_0x3a390b('0x3'),_0x200f8e,_0x42c1d5);})[_0x3dffd4('0x2a')](function(_0x609b78){const _0x53dbd0=_0x3dffd4;logger['info'](JSON[_0x53dbd0('0x2b')](_0x609b78));});});},Migration[_0x1bcf0c('0xa')]['query']=function(_0x418b9c){const _0x5d8b91=_0x1bcf0c,_0x14d4f9=this;this[_0x5d8b91('0x20')][_0x5d8b91('0x16')](function(){const _0x16aebb=_0x5d8b91;return _0x14d4f9[_0x16aebb('0x21')][_0x16aebb('0x1e')][_0x16aebb('0x24')](_0x418b9c)[_0x16aebb('0x1c')](function(){const _0x4c199a=_0x16aebb;logger[_0x4c199a('0x25')](_0x4c199a('0xd'),_0x418b9c);})[_0x16aebb('0x2a')](function(_0x3af15b){const _0x5a0530=_0x16aebb;logger['info'](JSON[_0x5a0530('0x2b')](_0x3af15b));});});},Migration[_0x1bcf0c('0xa')][_0x1bcf0c('0x27')]=function(_0x475e32,_0x1c287b){const _0x33c793=_0x1bcf0c,_0x1e6100=this;this[_0x33c793('0x20')][_0x33c793('0x16')](function(){const _0x4a4ee4=_0x33c793;return _0x1e6100['queryInterface'][_0x4a4ee4('0x27')](_0x475e32,_0x1c287b)[_0x4a4ee4('0x1c')](function(){const _0x4c6ed2=_0x4a4ee4;logger[_0x4c6ed2('0x25')](_0x4c6ed2('0x12'),_0x1c287b,_0x475e32);})[_0x4a4ee4('0x2a')](function(_0x15e046){const _0x5bb63a=_0x4a4ee4;logger[_0x5bb63a('0x25')](util[_0x5bb63a('0x14')](_0x15e046,{'showHidden':![],'depth':null}));});});},Migration[_0x1bcf0c('0xa')][_0x1bcf0c('0x7')]=function(_0x1e7f2b,_0x287092,_0x212481){const _0xe0db10=_0x1bcf0c,_0x3f59d7=this;this[_0xe0db10('0x20')][_0xe0db10('0x16')](function(){const _0x458b9b=_0xe0db10;return _0x3f59d7[_0x458b9b('0x21')]['renameColumn'](_0x1e7f2b,_0x287092,_0x212481)[_0x458b9b('0x1c')](function(){logger['info']('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x287092,_0x212481,_0x1e7f2b);})['catch'](function(_0x2f6648){const _0x42f2c4=_0x458b9b;logger[_0x42f2c4('0x25')](util[_0x42f2c4('0x14')](_0x2f6648,{'showHidden':![],'depth':null}));});});},Migration[_0x1bcf0c('0xa')]['final']=function(_0x4a2158){const _0x24b8dd=_0x1bcf0c;this['sequence'][_0x24b8dd('0x16')](function(){return _0x4a2158();});},module[_0x1bcf0c('0x11')]={'up':function(_0x143428,_0x1374aa){return new Promise(function(_0x39f77){const _0x8711be=a980_0x18f5,_0x5bded1=new Migration(_0x143428);_0x5bded1[_0x8711be('0xb')]('report_agent',_0x8711be('0x1b'),{'type':_0x1374aa['BOOLEAN'],'defaultValue':![]}),_0x5bded1['addColumn']('report_agent',_0x8711be('0x15'),{'type':_0x1374aa['STRING'],'comment':_0x8711be('0x22')}),_0x5bded1[_0x8711be('0xb')](_0x8711be('0x29'),_0x8711be('0x0'),{'type':_0x1374aa[_0x8711be('0x19')]}),_0x5bded1[_0x8711be('0xb')]('report_agent',_0x8711be('0x10'),{'type':_0x1374aa[_0x8711be('0x19')]}),_0x5bded1['addColumn']('report_agent',_0x8711be('0x2'),{'type':_0x1374aa[_0x8711be('0x1')],'defaultValue':0x0}),_0x5bded1[_0x8711be('0xb')](_0x8711be('0x17'),_0x8711be('0x1a'),{'type':_0x1374aa['DATE']}),_0x5bded1[_0x8711be('0xb')]('int_salesforce_configurations','ticketType',{'type':_0x1374aa['ENUM'](_0x8711be('0x5'),_0x8711be('0x23')),'defaultValue':_0x8711be('0x5')}),_0x5bded1[_0x8711be('0xf')](_0x39f77);});},'down':function(){}};