Built motion from commit ecdc8e66766c75b1b08288b0ea13eb12d42606b4. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.66.js
index f16b7b8..c5ea063 100644 (file)
@@ -1 +1 @@
-const a945_0x4264=['finally','mail_interactions','final','sequelize','join','info','changeColumn','addIndex','renameColumn','field','long','splitSizeXlsx','removeIndex','splitSizeCsv','queueTransferTimeout','INTEGER','analytics_report_fields','viber','inspect','then','mail_accounts','tools_schedules','removeColumn','catch','addIndex\x20%s\x20%s\x20%s','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','enqueue','\x20CHARSET\x20utf8mb4\x20COLLATE\x20utf8mb4_unicode_ci','Changed\x20column\x20%s\x20in\x20table\x20%s','lastMsgBody','phoneBarPrefixRequired','stringify','query','addColumn','queryInterface','BOOLEAN','bcc','Added\x20column\x20%s\x20to\x20%s','migration','prototype','agentTransfer','settings','subject','tail','../config/logger','Removed\x20column\x20%s\x20from\x20%s','split','queueTransfer','table\x20dropped\x20%s','dropTable','TEXT','STRING','sequence'];(function(_0x8412e8,_0x4264f1){const _0x2adcc8=function(_0x39c1b9){while(--_0x39c1b9){_0x8412e8['push'](_0x8412e8['shift']());}};_0x2adcc8(++_0x4264f1);}(a945_0x4264,0xa7));const a945_0x2adc=function(_0x8412e8,_0x4264f1){_0x8412e8=_0x8412e8-0x0;let _0x2adcc8=a945_0x4264[_0x8412e8];return _0x2adcc8;};const _0x3cf507=a945_0x2adc;'use strict';const util=require('util'),logger=require(_0x3cf507('0x24'))(_0x3cf507('0x1e')),Sequence=function(){};Sequence['prototype'][_0x3cf507('0x12')]=function(_0x39c1b9){const _0x41d4f5=_0x3cf507;this[_0x41d4f5('0x23')]=this[_0x41d4f5('0x23')]?this[_0x41d4f5('0x23')][_0x41d4f5('0x2d')](_0x39c1b9):_0x39c1b9();};const Migration=function(_0x4a81c3){const _0x360551=_0x3cf507;this[_0x360551('0x1a')]=_0x4a81c3,this[_0x360551('0x2c')]=new Sequence();};Migration[_0x3cf507('0x1f')]['changeColumn']=function(_0x375ba8,_0x14a389,_0x5c5d33){const _0x2ee266=_0x3cf507,_0x2558f2=this;this[_0x2ee266('0x2c')]['enqueue'](function(){const _0x2e02df=_0x2ee266;return _0x2558f2[_0x2e02df('0x1a')]['changeColumn'](_0x375ba8,_0x14a389,_0x5c5d33)['then'](function(){const _0x1f8596=_0x2e02df;logger[_0x1f8596('0x32')](_0x1f8596('0x14'),_0x14a389,_0x375ba8);})[_0x2e02df('0xf')](function(_0x2b578f){const _0x449aac=_0x2e02df;logger[_0x449aac('0x32')](JSON[_0x449aac('0x17')](_0x2b578f));});});},Migration[_0x3cf507('0x1f')][_0x3cf507('0x19')]=function(_0x4cc81b,_0xbb0233,_0x5ec518){const _0x3d1f91=_0x3cf507,_0xdf602d=this;this['sequence'][_0x3d1f91('0x12')](function(){const _0x51d75a=_0x3d1f91;return _0xdf602d['queryInterface'][_0x51d75a('0x19')](_0x4cc81b,_0xbb0233,_0x5ec518)['then'](function(){const _0x5f04d0=_0x51d75a;logger[_0x5f04d0('0x32')](_0x5f04d0('0x1d'),_0xbb0233,_0x4cc81b);})['catch'](function(_0x55ebae){const _0x26c393=_0x51d75a;logger[_0x26c393('0x32')](JSON['stringify'](_0x55ebae));});});},Migration['prototype'][_0x3cf507('0x29')]=function(_0x45020d){const _0x27006b=this;this['sequence']['enqueue'](function(){const _0x3f1ea5=a945_0x2adc;return _0x27006b[_0x3f1ea5('0x1a')][_0x3f1ea5('0x29')](_0x45020d,{'force':!![]})[_0x3f1ea5('0xb')](function(){const _0x138a53=_0x3f1ea5;logger['info'](_0x138a53('0x28'),_0x45020d);})[_0x3f1ea5('0xf')](function(_0x3952cf){const _0x4633f6=_0x3f1ea5;logger[_0x4633f6('0x32')](JSON[_0x4633f6('0x17')](_0x3952cf));});});},Migration[_0x3cf507('0x1f')][_0x3cf507('0x34')]=function(_0x52a014,_0x521356,_0x4be15e){const _0x515975=_0x3cf507,_0x3faa4e=this;this[_0x515975('0x2c')][_0x515975('0x12')](function(){const _0x56b288=_0x515975;return _0x3faa4e[_0x56b288('0x1a')][_0x56b288('0x34')](_0x52a014,_0x521356,{'indexName':_0x4be15e})[_0x56b288('0xb')](function(){const _0x1e80f8=_0x56b288;logger[_0x1e80f8('0x32')](_0x1e80f8('0x10'),_0x52a014,_0x521356[_0x1e80f8('0x31')](','),_0x4be15e);})[_0x56b288('0xf')](function(_0x34018a){const _0x23b341=_0x56b288;logger[_0x23b341('0x32')](JSON[_0x23b341('0x17')](_0x34018a));});});},Migration[_0x3cf507('0x1f')]['removeIndex']=function(_0x1cc1d7,_0x82f297){const _0x3cd003=_0x3cf507,_0xb12c65=this;this[_0x3cd003('0x2c')]['enqueue'](function(){const _0x4edabf=_0x3cd003;return _0xb12c65[_0x4edabf('0x1a')][_0x4edabf('0x4')](_0x1cc1d7,_0x82f297)[_0x4edabf('0xb')](function(){const _0x17440d=_0x4edabf;logger[_0x17440d('0x32')]('removeIndex\x20%s\x20%s',_0x1cc1d7,_0x82f297);})[_0x4edabf('0xf')](function(_0x499cc5){const _0x1a0cf4=_0x4edabf;logger[_0x1a0cf4('0x32')](JSON[_0x1a0cf4('0x17')](_0x499cc5));});});},Migration[_0x3cf507('0x1f')][_0x3cf507('0x18')]=function(_0xe74523){const _0xb3b1c4=_0x3cf507,_0x5cb365=this;this[_0xb3b1c4('0x2c')][_0xb3b1c4('0x12')](function(){const _0x43dd9f=_0xb3b1c4;return _0x5cb365[_0x43dd9f('0x1a')][_0x43dd9f('0x30')][_0x43dd9f('0x18')](_0xe74523)['then'](function(){logger['info']('query\x20%s',_0xe74523);})[_0x43dd9f('0xf')](function(_0x567a76){const _0x59e044=_0x43dd9f;logger[_0x59e044('0x32')](JSON['stringify'](_0x567a76));});});},Migration[_0x3cf507('0x1f')][_0x3cf507('0xe')]=function(_0x57994e,_0x29bccb){const _0x3343e2=_0x3cf507,_0x54a1cb=this;this[_0x3343e2('0x2c')][_0x3343e2('0x12')](function(){const _0x894af9=_0x3343e2;return _0x54a1cb[_0x894af9('0x1a')][_0x894af9('0xe')](_0x57994e,_0x29bccb)['then'](function(){const _0x685228=_0x894af9;logger[_0x685228('0x32')](_0x685228('0x25'),_0x29bccb,_0x57994e);})[_0x894af9('0xf')](function(_0x2dec99){const _0x1c3ff7=_0x894af9;logger[_0x1c3ff7('0x32')](util[_0x1c3ff7('0xa')](_0x2dec99,{'showHidden':![],'depth':null}));});});},Migration[_0x3cf507('0x1f')][_0x3cf507('0x0')]=function(_0xdecd28,_0x3ea5ab,_0x24dec9){const _0x1e801f=_0x3cf507,_0xbe2b08=this;this[_0x1e801f('0x2c')][_0x1e801f('0x12')](function(){const _0x2cdce8=_0x1e801f;return _0xbe2b08[_0x2cdce8('0x1a')]['renameColumn'](_0xdecd28,_0x3ea5ab,_0x24dec9)['then'](function(){const _0x3ea792=_0x2cdce8;logger[_0x3ea792('0x32')](_0x3ea792('0x11'),_0x3ea5ab,_0x24dec9,_0xdecd28);})[_0x2cdce8('0xf')](function(_0x29fb98){const _0x1d198=_0x2cdce8;logger['info'](util[_0x1d198('0xa')](_0x29fb98,{'showHidden':![],'depth':null}));});});},Migration[_0x3cf507('0x1f')][_0x3cf507('0x2f')]=function(_0xb09434){const _0x270648=_0x3cf507;this[_0x270648('0x2c')][_0x270648('0x12')](function(){return _0xb09434();});},module['exports']={'up':function(_0x5b14a2,_0x30b0c6){return new Promise(function(_0x46586c){const _0x54bf99=a945_0x2adc,_0x123961=new Migration(_0x5b14a2);_0x123961['changeColumn'](_0x54bf99('0x8'),_0x54bf99('0x1'),{'type':_0x30b0c6['TEXT']}),_0x123961[_0x54bf99('0x19')](_0x54bf99('0xd'),'cc',{'type':_0x30b0c6['TEXT']}),_0x123961[_0x54bf99('0x19')](_0x54bf99('0xd'),_0x54bf99('0x1c'),{'type':_0x30b0c6[_0x54bf99('0x2a')]}),_0x123961['addColumn'](_0x54bf99('0x21'),_0x54bf99('0x26'),{'type':_0x30b0c6[_0x54bf99('0x1b')],'defaultValue':!![]}),_0x123961[_0x54bf99('0x19')]('settings',_0x54bf99('0x5'),{'type':_0x30b0c6[_0x54bf99('0x7')],'defaultValue':0x1388}),_0x123961[_0x54bf99('0x19')]('settings','splitSizePdf',{'type':_0x30b0c6[_0x54bf99('0x7')],'defaultValue':0x3e8}),_0x123961['addColumn'](_0x54bf99('0x21'),_0x54bf99('0x3'),{'type':_0x30b0c6[_0x54bf99('0x7')],'defaultValue':0x1388}),_0x123961['addColumn'](_0x54bf99('0xc'),_0x54bf99('0x27'),{'type':_0x30b0c6['BOOLEAN'],'defaultValue':![]}),_0x123961[_0x54bf99('0x19')](_0x54bf99('0xc'),_0x54bf99('0x6'),{'type':_0x30b0c6[_0x54bf99('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x123961[_0x54bf99('0x19')](_0x54bf99('0xc'),_0x54bf99('0x20'),{'type':_0x30b0c6[_0x54bf99('0x1b')],'defaultValue':![]}),_0x123961[_0x54bf99('0x19')](_0x54bf99('0xc'),'agentTransferTimeout',{'type':_0x30b0c6[_0x54bf99('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x123961[_0x54bf99('0x19')]('users',_0x54bf99('0x16'),{'type':_0x30b0c6['BOOLEAN'],'defaultValue':![]}),_0x123961['changeColumn']('mail_interactions',_0x54bf99('0x22'),{'type':_0x30b0c6[_0x54bf99('0x2a')]('')+_0x54bf99('0x13')}),_0x123961[_0x54bf99('0x33')](_0x54bf99('0x2e'),_0x54bf99('0x15'),{'type':_0x30b0c6['TEXT'](_0x54bf99('0x2'))+_0x54bf99('0x13')}),_0x123961[_0x54bf99('0x19')]('cm_contacts',_0x54bf99('0x9'),{'type':_0x30b0c6[_0x54bf99('0x2b')]}),_0x123961[_0x54bf99('0x2f')](_0x46586c);});},'down':function(){}};
\ No newline at end of file
+const a945_0x3fe6=['tools_schedules','renameColumn','long','query','queueTransferTimeout','lastMsgBody','addIndex','stringify','sequelize','util','enqueue','sequence','INTEGER','splitSizeCsv','BOOLEAN','../config/logger','changeColumn','info','phoneBarPrefixRequired','removeColumn','queueTransfer','TEXT','mail_accounts','migration','then','agentTransferTimeout','catch','addColumn','subject','join','users','queryInterface','STRING','table\x20dropped\x20%s','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','bcc','split','prototype','agentTransfer','cm_contacts','removeIndex','inspect','Removed\x20column\x20%s\x20from\x20%s','mail_interactions','tail','dropTable','settings','analytics_report_fields'];(function(_0x151d7d,_0x3fe6ee){const _0x9d2b22=function(_0x288ee1){while(--_0x288ee1){_0x151d7d['push'](_0x151d7d['shift']());}};_0x9d2b22(++_0x3fe6ee);}(a945_0x3fe6,0x182));const a945_0x9d2b=function(_0x151d7d,_0x3fe6ee){_0x151d7d=_0x151d7d-0x0;let _0x9d2b22=a945_0x3fe6[_0x151d7d];return _0x9d2b22;};const _0x21416b=a945_0x9d2b;'use strict';const util=require(_0x21416b('0x7')),logger=require(_0x21416b('0xd'))(_0x21416b('0x15')),Sequence=function(){};Sequence[_0x21416b('0x23')]['enqueue']=function(_0x288ee1){const _0x241182=_0x21416b;this['tail']=this[_0x241182('0x2a')]?this[_0x241182('0x2a')]['finally'](_0x288ee1):_0x288ee1();};const Migration=function(_0x307939){const _0xb24174=_0x21416b;this[_0xb24174('0x1d')]=_0x307939,this[_0xb24174('0x9')]=new Sequence();};Migration[_0x21416b('0x23')][_0x21416b('0xe')]=function(_0x48c9e9,_0x5ce12d,_0x5d31cd){const _0x480605=_0x21416b,_0x3a2033=this;this[_0x480605('0x9')][_0x480605('0x8')](function(){const _0x21fd4a=_0x480605;return _0x3a2033[_0x21fd4a('0x1d')]['changeColumn'](_0x48c9e9,_0x5ce12d,_0x5d31cd)[_0x21fd4a('0x16')](function(){const _0x36445a=_0x21fd4a;logger[_0x36445a('0xf')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x5ce12d,_0x48c9e9);})[_0x21fd4a('0x18')](function(_0x32c1cc){const _0xc66b29=_0x21fd4a;logger[_0xc66b29('0xf')](JSON[_0xc66b29('0x5')](_0x32c1cc));});});},Migration['prototype'][_0x21416b('0x19')]=function(_0x16f312,_0x1fd12b,_0x4654d2){const _0x1e9cf3=_0x21416b,_0x4e649f=this;this['sequence'][_0x1e9cf3('0x8')](function(){const _0x5643f2=_0x1e9cf3;return _0x4e649f[_0x5643f2('0x1d')][_0x5643f2('0x19')](_0x16f312,_0x1fd12b,_0x4654d2)['then'](function(){logger['info']('Added\x20column\x20%s\x20to\x20%s',_0x1fd12b,_0x16f312);})[_0x5643f2('0x18')](function(_0x4632d5){const _0x520599=_0x5643f2;logger['info'](JSON[_0x520599('0x5')](_0x4632d5));});});},Migration[_0x21416b('0x23')][_0x21416b('0x2b')]=function(_0x1c44ff){const _0x585315=_0x21416b,_0x10652f=this;this[_0x585315('0x9')]['enqueue'](function(){const _0xcc2689=_0x585315;return _0x10652f[_0xcc2689('0x1d')][_0xcc2689('0x2b')](_0x1c44ff,{'force':!![]})[_0xcc2689('0x16')](function(){const _0x1ef38a=_0xcc2689;logger[_0x1ef38a('0xf')](_0x1ef38a('0x1f'),_0x1c44ff);})[_0xcc2689('0x18')](function(_0x383900){const _0x18bdc2=_0xcc2689;logger['info'](JSON[_0x18bdc2('0x5')](_0x383900));});});},Migration[_0x21416b('0x23')][_0x21416b('0x4')]=function(_0x533b3e,_0x2b5563,_0x182dfa){const _0x59831b=_0x21416b,_0x333a02=this;this[_0x59831b('0x9')][_0x59831b('0x8')](function(){const _0x2b4403=_0x59831b;return _0x333a02[_0x2b4403('0x1d')][_0x2b4403('0x4')](_0x533b3e,_0x2b5563,{'indexName':_0x182dfa})[_0x2b4403('0x16')](function(){const _0x11ec91=_0x2b4403;logger[_0x11ec91('0xf')]('addIndex\x20%s\x20%s\x20%s',_0x533b3e,_0x2b5563[_0x11ec91('0x1b')](','),_0x182dfa);})[_0x2b4403('0x18')](function(_0x3df614){const _0x4fec2f=_0x2b4403;logger['info'](JSON[_0x4fec2f('0x5')](_0x3df614));});});},Migration[_0x21416b('0x23')][_0x21416b('0x26')]=function(_0x1ae978,_0x5d96c2){const _0x5143a5=_0x21416b,_0x1bb36c=this;this[_0x5143a5('0x9')]['enqueue'](function(){const _0x3e2318=_0x5143a5;return _0x1bb36c['queryInterface']['removeIndex'](_0x1ae978,_0x5d96c2)[_0x3e2318('0x16')](function(){const _0x4f9fe8=_0x3e2318;logger[_0x4f9fe8('0xf')]('removeIndex\x20%s\x20%s',_0x1ae978,_0x5d96c2);})[_0x3e2318('0x18')](function(_0x3a7a22){const _0x4b9ac7=_0x3e2318;logger[_0x4b9ac7('0xf')](JSON[_0x4b9ac7('0x5')](_0x3a7a22));});});},Migration[_0x21416b('0x23')][_0x21416b('0x1')]=function(_0x15138e){const _0x4cbed4=_0x21416b,_0x23ddef=this;this['sequence'][_0x4cbed4('0x8')](function(){const _0x197f0e=_0x4cbed4;return _0x23ddef[_0x197f0e('0x1d')][_0x197f0e('0x6')][_0x197f0e('0x1')](_0x15138e)['then'](function(){logger['info']('query\x20%s',_0x15138e);})[_0x197f0e('0x18')](function(_0x171435){const _0x1343cc=_0x197f0e;logger[_0x1343cc('0xf')](JSON[_0x1343cc('0x5')](_0x171435));});});},Migration['prototype'][_0x21416b('0x11')]=function(_0x1d9ae5,_0x3bcc40){const _0x48c4b3=_0x21416b,_0x996425=this;this[_0x48c4b3('0x9')]['enqueue'](function(){const _0x1f1b76=_0x48c4b3;return _0x996425[_0x1f1b76('0x1d')][_0x1f1b76('0x11')](_0x1d9ae5,_0x3bcc40)['then'](function(){const _0x59028b=_0x1f1b76;logger[_0x59028b('0xf')](_0x59028b('0x28'),_0x3bcc40,_0x1d9ae5);})[_0x1f1b76('0x18')](function(_0x3c8b1a){const _0x1cf0e2=_0x1f1b76;logger['info'](util[_0x1cf0e2('0x27')](_0x3c8b1a,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x21416b('0x2f')]=function(_0xcbacd2,_0x4d8ba9,_0x5f5a7b){const _0x3a0473=_0x21416b,_0x135c7a=this;this[_0x3a0473('0x9')]['enqueue'](function(){const _0xd77d5=_0x3a0473;return _0x135c7a[_0xd77d5('0x1d')][_0xd77d5('0x2f')](_0xcbacd2,_0x4d8ba9,_0x5f5a7b)[_0xd77d5('0x16')](function(){const _0x6ab251=_0xd77d5;logger[_0x6ab251('0xf')](_0x6ab251('0x20'),_0x4d8ba9,_0x5f5a7b,_0xcbacd2);})['catch'](function(_0x490957){const _0x5057bf=_0xd77d5;logger[_0x5057bf('0xf')](util['inspect'](_0x490957,{'showHidden':![],'depth':null}));});});},Migration['prototype']['final']=function(_0x4aabcc){const _0x16a32e=_0x21416b;this[_0x16a32e('0x9')][_0x16a32e('0x8')](function(){return _0x4aabcc();});},module['exports']={'up':function(_0x2caa00,_0x4b4fa1){return new Promise(function(_0x457915){const _0x1923cc=a945_0x9d2b,_0x5655fe=new Migration(_0x2caa00);_0x5655fe[_0x1923cc('0xe')](_0x1923cc('0x2d'),'field',{'type':_0x4b4fa1[_0x1923cc('0x13')]}),_0x5655fe[_0x1923cc('0x19')]('tools_schedules','cc',{'type':_0x4b4fa1[_0x1923cc('0x13')]}),_0x5655fe[_0x1923cc('0x19')](_0x1923cc('0x2e'),_0x1923cc('0x21'),{'type':_0x4b4fa1['TEXT']}),_0x5655fe[_0x1923cc('0x19')]('settings',_0x1923cc('0x22'),{'type':_0x4b4fa1['BOOLEAN'],'defaultValue':!![]}),_0x5655fe[_0x1923cc('0x19')](_0x1923cc('0x2c'),_0x1923cc('0xb'),{'type':_0x4b4fa1[_0x1923cc('0xa')],'defaultValue':0x1388}),_0x5655fe[_0x1923cc('0x19')](_0x1923cc('0x2c'),'splitSizePdf',{'type':_0x4b4fa1[_0x1923cc('0xa')],'defaultValue':0x3e8}),_0x5655fe[_0x1923cc('0x19')](_0x1923cc('0x2c'),'splitSizeXlsx',{'type':_0x4b4fa1[_0x1923cc('0xa')],'defaultValue':0x1388}),_0x5655fe['addColumn'](_0x1923cc('0x14'),_0x1923cc('0x12'),{'type':_0x4b4fa1[_0x1923cc('0xc')],'defaultValue':![]}),_0x5655fe['addColumn'](_0x1923cc('0x14'),_0x1923cc('0x2'),{'type':_0x4b4fa1[_0x1923cc('0xa')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x5655fe[_0x1923cc('0x19')](_0x1923cc('0x14'),_0x1923cc('0x24'),{'type':_0x4b4fa1[_0x1923cc('0xc')],'defaultValue':![]}),_0x5655fe[_0x1923cc('0x19')](_0x1923cc('0x14'),_0x1923cc('0x17'),{'type':_0x4b4fa1['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0x5655fe[_0x1923cc('0x19')](_0x1923cc('0x1c'),_0x1923cc('0x10'),{'type':_0x4b4fa1[_0x1923cc('0xc')],'defaultValue':![]}),_0x5655fe[_0x1923cc('0xe')](_0x1923cc('0x29'),_0x1923cc('0x1a'),{'type':_0x4b4fa1[_0x1923cc('0x13')]('')+'\x20CHARSET\x20utf8mb4\x20COLLATE\x20utf8mb4_unicode_ci'}),_0x5655fe[_0x1923cc('0xe')](_0x1923cc('0x29'),_0x1923cc('0x3'),{'type':_0x4b4fa1['TEXT'](_0x1923cc('0x0'))+'\x20CHARSET\x20utf8mb4\x20COLLATE\x20utf8mb4_unicode_ci'}),_0x5655fe[_0x1923cc('0x19')](_0x1923cc('0x25'),'viber',{'type':_0x4b4fa1[_0x1923cc('0x1e')]}),_0x5655fe['final'](_0x457915);});},'down':function(){}};
\ No newline at end of file