Built motion from commit 459747fdfe53bbf13fbede61eeaffea1f1438f86. Version 3.0.0...
[motion-next.git] / server / migrations / 2.4.7.js
1 const a1010_0x3648=['stringify','ENUM','Contacts','chat_websites','customerPort','moduleCreate','exports','catch','then','BOOLEAN','prototype','../config/logger','sequelize','removeIndex','queryInterface','join','removeIndex\x20%s\x20%s','table\x20dropped\x20%s','chat_interactions','dropTable','Feedback','enqueue','STRING','query','addIndex','feedbackTitle','inspect','indicesType','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','Changed\x20column\x20%s\x20in\x20table\x20%s','sequence','indexName','Removed\x20column\x20%s\x20from\x20%s','util','int_zoho_configurations','migration','Leads','renameColumn','changeColumn','finally','addColumn','info','tail'];(function(_0x2c22f2,_0x3648d5){const _0x109e38=function(_0x4adfee){while(--_0x4adfee){_0x2c22f2['push'](_0x2c22f2['shift']());}};_0x109e38(++_0x3648d5);}(a1010_0x3648,0x170));const a1010_0x109e=function(_0x2c22f2,_0x3648d5){_0x2c22f2=_0x2c22f2-0x0;let _0x109e38=a1010_0x3648[_0x2c22f2];return _0x109e38;};const _0x5e73b0=a1010_0x109e;'use strict';const util=require(_0x5e73b0('0x9')),logger=require(_0x5e73b0('0x1e'))(_0x5e73b0('0xb')),Sequence=function(){};Sequence[_0x5e73b0('0x1d')][_0x5e73b0('0x28')]=function(_0x4adfee){const _0x41372b=_0x5e73b0;this[_0x41372b('0x12')]=this['tail']?this[_0x41372b('0x12')][_0x41372b('0xf')](_0x4adfee):_0x4adfee();};const Migration=function(_0x125030){const _0x33ad21=_0x5e73b0;this[_0x33ad21('0x21')]=_0x125030,this[_0x33ad21('0x6')]=new Sequence();};Migration[_0x5e73b0('0x1d')][_0x5e73b0('0xe')]=function(_0x24e959,_0x24ea95,_0x44c332){const _0x3128e9=this;this['sequence']['enqueue'](function(){const _0x44f40b=a1010_0x109e;return _0x3128e9[_0x44f40b('0x21')]['changeColumn'](_0x24e959,_0x24ea95,_0x44c332)['then'](function(){const _0x56ef4b=_0x44f40b;logger['info'](_0x56ef4b('0x5'),_0x24ea95,_0x24e959);})['catch'](function(_0x3efbae){const _0x29762e=_0x44f40b;logger['info'](JSON[_0x29762e('0x13')](_0x3efbae));});});},Migration[_0x5e73b0('0x1d')][_0x5e73b0('0x10')]=function(_0x56e660,_0x2e9a4a,_0x508d30){const _0x5f36a7=_0x5e73b0,_0x1aba88=this;this[_0x5f36a7('0x6')]['enqueue'](function(){const _0x4e44fe=_0x5f36a7;return _0x1aba88['queryInterface'][_0x4e44fe('0x10')](_0x56e660,_0x2e9a4a,_0x508d30)[_0x4e44fe('0x1b')](function(){const _0x569262=_0x4e44fe;logger[_0x569262('0x11')]('Added\x20column\x20%s\x20to\x20%s',_0x2e9a4a,_0x56e660);})[_0x4e44fe('0x1a')](function(_0x328561){const _0x3e25a6=_0x4e44fe;logger[_0x3e25a6('0x11')](JSON['stringify'](_0x328561));});});},Migration[_0x5e73b0('0x1d')][_0x5e73b0('0x26')]=function(_0x4a5975){const _0x4d097d=_0x5e73b0,_0x1d141e=this;this['sequence'][_0x4d097d('0x28')](function(){const _0xe0afcc=_0x4d097d;return _0x1d141e[_0xe0afcc('0x21')][_0xe0afcc('0x26')](_0x4a5975,{'force':!![]})['then'](function(){const _0x21b7fe=_0xe0afcc;logger[_0x21b7fe('0x11')](_0x21b7fe('0x24'),_0x4a5975);})[_0xe0afcc('0x1a')](function(_0x3fb173){const _0xc35c89=_0xe0afcc;logger[_0xc35c89('0x11')](JSON[_0xc35c89('0x13')](_0x3fb173));});});},Migration['prototype']['addIndex']=function(_0x4992c3,_0x415674,_0x59d1fa){const _0x1e1821=_0x5e73b0,_0x48e487=this;this['sequence'][_0x1e1821('0x28')](function(){const _0x245117=_0x1e1821;return _0x48e487[_0x245117('0x21')][_0x245117('0x0')](_0x4992c3,_0x415674,{'indexName':_0x59d1fa[_0x245117('0x7')],'indicesType':_0x59d1fa[_0x245117('0x3')]})[_0x245117('0x1b')](function(){const _0x5f064a=_0x245117;logger[_0x5f064a('0x11')]('addIndex\x20%s\x20%s\x20%s\x20[%s]',_0x4992c3,_0x415674[_0x5f064a('0x22')](','),_0x59d1fa[_0x5f064a('0x7')],_0x59d1fa[_0x5f064a('0x3')]);})[_0x245117('0x1a')](function(_0x1e6dad){const _0xbe2409=_0x245117;logger[_0xbe2409('0x11')](JSON[_0xbe2409('0x13')](_0x1e6dad));});});},Migration['prototype'][_0x5e73b0('0x20')]=function(_0x264438,_0x3ea036){const _0x362ea2=_0x5e73b0,_0x20ff84=this;this[_0x362ea2('0x6')][_0x362ea2('0x28')](function(){const _0x262d05=_0x362ea2;return _0x20ff84[_0x262d05('0x21')][_0x262d05('0x20')](_0x264438,_0x3ea036)['then'](function(){const _0x37ca29=_0x262d05;logger[_0x37ca29('0x11')](_0x37ca29('0x23'),_0x264438,_0x3ea036);})[_0x262d05('0x1a')](function(_0x1700c6){const _0x4375c2=_0x262d05;logger['info'](JSON[_0x4375c2('0x13')](_0x1700c6));});});},Migration[_0x5e73b0('0x1d')][_0x5e73b0('0x2a')]=function(_0x3dd19e){const _0x54b3ff=_0x5e73b0,_0x3d1a30=this;this['sequence'][_0x54b3ff('0x28')](function(){const _0x497857=_0x54b3ff;return _0x3d1a30['queryInterface'][_0x497857('0x1f')]['query'](_0x3dd19e)[_0x497857('0x1b')](function(){const _0x1182b9=_0x497857;logger[_0x1182b9('0x11')]('query\x20%s',_0x3dd19e);})['catch'](function(_0x48bdb1){const _0x230011=_0x497857;logger[_0x230011('0x11')](JSON[_0x230011('0x13')](_0x48bdb1));});});},Migration['prototype']['removeColumn']=function(_0x73ddb5,_0xb061c4){const _0x260407=_0x5e73b0,_0x32931b=this;this['sequence'][_0x260407('0x28')](function(){const _0x2ed08c=_0x260407;return _0x32931b[_0x2ed08c('0x21')]['removeColumn'](_0x73ddb5,_0xb061c4)[_0x2ed08c('0x1b')](function(){const _0x44fe83=_0x2ed08c;logger['info'](_0x44fe83('0x8'),_0xb061c4,_0x73ddb5);})['catch'](function(_0x5995e2){const _0x1360a3=_0x2ed08c;logger['info'](util[_0x1360a3('0x2')](_0x5995e2,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x5e73b0('0xd')]=function(_0x2da89e,_0x1a1262,_0xf536e4){const _0x113751=_0x5e73b0,_0x2f4007=this;this[_0x113751('0x6')][_0x113751('0x28')](function(){const _0x422e3b=_0x113751;return _0x2f4007[_0x422e3b('0x21')]['renameColumn'](_0x2da89e,_0x1a1262,_0xf536e4)['then'](function(){const _0xa6d4c3=_0x422e3b;logger[_0xa6d4c3('0x11')](_0xa6d4c3('0x4'),_0x1a1262,_0xf536e4,_0x2da89e);})[_0x422e3b('0x1a')](function(_0x34ab9f){const _0x399f99=_0x422e3b;logger[_0x399f99('0x11')](util[_0x399f99('0x2')](_0x34ab9f,{'showHidden':![],'depth':null}));});});},Migration[_0x5e73b0('0x1d')]['final']=function(_0x2ae784){const _0x25d181=_0x5e73b0;this[_0x25d181('0x6')][_0x25d181('0x28')](function(){return _0x2ae784();});},module[_0x5e73b0('0x19')]={'up':function(_0xd063d0,_0x2aa4c7){return new Promise(function(_0x566afa){const _0x25c99e=a1010_0x109e,_0x322b06=new Migration(_0xd063d0);_0x322b06[_0x25c99e('0x10')](_0x25c99e('0xa'),_0x25c99e('0x18'),{'type':_0x2aa4c7[_0x25c99e('0x14')](_0x25c99e('0xc'),_0x25c99e('0x15')),'defaultValue':_0x25c99e('0xc')}),_0x322b06[_0x25c99e('0x10')](_0x25c99e('0x25'),_0x25c99e('0x17'),{'type':_0x2aa4c7[_0x25c99e('0x29')]}),_0x322b06[_0x25c99e('0x10')]('chat_websites','enableSendButton',{'type':_0x2aa4c7[_0x25c99e('0x1c')],'defaultValue':![]}),_0x322b06[_0x25c99e('0x10')](_0x25c99e('0x16'),_0x25c99e('0x1'),{'type':_0x2aa4c7[_0x25c99e('0x29')],'defaultValue':_0x25c99e('0x27')}),_0x322b06['final'](_0x566afa);});},'down':function(){}};