Built motion from commit 973e3e332e1c8e2f84c4b0cd2e5af794131724f5. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.66.js
index c5ea063..213a35b 100644 (file)
@@ -1 +1 @@
-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
+const a945_0x4567=['finally','long','mail_interactions','TEXT','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','query\x20%s','removeIndex','splitSizeCsv','settings','prototype','BOOLEAN','split','tools_schedules','dropTable','removeColumn','migration','query','users','stringify','then','mail_accounts','Changed\x20column\x20%s\x20in\x20table\x20%s','queryInterface','enqueue','changeColumn','lastMsgBody','inspect','field','INTEGER','analytics_report_fields','agentTransferTimeout','renameColumn','sequence','cm_contacts','Added\x20column\x20%s\x20to\x20%s','\x20CHARSET\x20utf8mb4\x20COLLATE\x20utf8mb4_unicode_ci','tail','catch','queueTransfer','splitSizePdf','../config/logger','STRING','exports','sequelize','info','addColumn','viber','phoneBarPrefixRequired','addIndex','table\x20dropped\x20%s'];(function(_0x20ae88,_0x456725){const _0x2f55e7=function(_0x2d5441){while(--_0x2d5441){_0x20ae88['push'](_0x20ae88['shift']());}};_0x2f55e7(++_0x456725);}(a945_0x4567,0x11a));const a945_0x2f55=function(_0x20ae88,_0x456725){_0x20ae88=_0x20ae88-0x0;let _0x2f55e7=a945_0x4567[_0x20ae88];return _0x2f55e7;};const _0xb8fb53=a945_0x2f55;'use strict';const util=require('util'),logger=require(_0xb8fb53('0x8'))(_0xb8fb53('0x21')),Sequence=function(){};Sequence[_0xb8fb53('0x1b')][_0xb8fb53('0x29')]=function(_0x2d5441){const _0x27cd64=_0xb8fb53;this[_0x27cd64('0x4')]=this[_0x27cd64('0x4')]?this[_0x27cd64('0x4')][_0x27cd64('0x12')](_0x2d5441):_0x2d5441();};const Migration=function(_0x427844){const _0x47ab80=_0xb8fb53;this[_0x47ab80('0x28')]=_0x427844,this[_0x47ab80('0x0')]=new Sequence();};Migration[_0xb8fb53('0x1b')]['changeColumn']=function(_0x291f80,_0x55358f,_0x17ff3c){const _0x52e088=_0xb8fb53,_0xc09d6a=this;this[_0x52e088('0x0')][_0x52e088('0x29')](function(){const _0x2f96b4=_0x52e088;return _0xc09d6a['queryInterface']['changeColumn'](_0x291f80,_0x55358f,_0x17ff3c)[_0x2f96b4('0x25')](function(){const _0x4a58d9=_0x2f96b4;logger[_0x4a58d9('0xc')](_0x4a58d9('0x27'),_0x55358f,_0x291f80);})[_0x2f96b4('0x5')](function(_0x5ea45d){const _0x5ef0f2=_0x2f96b4;logger[_0x5ef0f2('0xc')](JSON[_0x5ef0f2('0x24')](_0x5ea45d));});});},Migration['prototype'][_0xb8fb53('0xd')]=function(_0x508c44,_0x296eea,_0x452968){const _0x23fb7=this;this['sequence']['enqueue'](function(){const _0x2bb83c=a945_0x2f55;return _0x23fb7[_0x2bb83c('0x28')][_0x2bb83c('0xd')](_0x508c44,_0x296eea,_0x452968)['then'](function(){const _0x63e505=_0x2bb83c;logger['info'](_0x63e505('0x2'),_0x296eea,_0x508c44);})[_0x2bb83c('0x5')](function(_0x4fc5ea){const _0x430163=_0x2bb83c;logger[_0x430163('0xc')](JSON[_0x430163('0x24')](_0x4fc5ea));});});},Migration['prototype'][_0xb8fb53('0x1f')]=function(_0x1f6b9){const _0x1b9fb9=_0xb8fb53,_0xdeac12=this;this['sequence'][_0x1b9fb9('0x29')](function(){const _0x429893=_0x1b9fb9;return _0xdeac12['queryInterface'][_0x429893('0x1f')](_0x1f6b9,{'force':!![]})[_0x429893('0x25')](function(){const _0x2e367b=_0x429893;logger[_0x2e367b('0xc')](_0x2e367b('0x11'),_0x1f6b9);})[_0x429893('0x5')](function(_0x2714c6){const _0x20c79d=_0x429893;logger[_0x20c79d('0xc')](JSON[_0x20c79d('0x24')](_0x2714c6));});});},Migration['prototype'][_0xb8fb53('0x10')]=function(_0x28dba5,_0x209da3,_0x393e21){const _0x541e1c=_0xb8fb53,_0x122833=this;this['sequence'][_0x541e1c('0x29')](function(){const _0xd145e=_0x541e1c;return _0x122833[_0xd145e('0x28')][_0xd145e('0x10')](_0x28dba5,_0x209da3,{'indexName':_0x393e21})[_0xd145e('0x25')](function(){logger['info']('addIndex\x20%s\x20%s\x20%s',_0x28dba5,_0x209da3['join'](','),_0x393e21);})[_0xd145e('0x5')](function(_0x40e145){const _0x2edd8b=_0xd145e;logger[_0x2edd8b('0xc')](JSON[_0x2edd8b('0x24')](_0x40e145));});});},Migration[_0xb8fb53('0x1b')][_0xb8fb53('0x18')]=function(_0x11b66f,_0x3c845f){const _0x3817a2=_0xb8fb53,_0x49849f=this;this[_0x3817a2('0x0')][_0x3817a2('0x29')](function(){const _0x3251cc=_0x3817a2;return _0x49849f[_0x3251cc('0x28')][_0x3251cc('0x18')](_0x11b66f,_0x3c845f)[_0x3251cc('0x25')](function(){const _0x494ea7=_0x3251cc;logger[_0x494ea7('0xc')]('removeIndex\x20%s\x20%s',_0x11b66f,_0x3c845f);})['catch'](function(_0x78ea47){const _0x56a7d2=_0x3251cc;logger['info'](JSON[_0x56a7d2('0x24')](_0x78ea47));});});},Migration[_0xb8fb53('0x1b')][_0xb8fb53('0x22')]=function(_0x4dda74){const _0x2fcbe8=_0xb8fb53,_0x5ded09=this;this[_0x2fcbe8('0x0')]['enqueue'](function(){const _0x10c68b=_0x2fcbe8;return _0x5ded09[_0x10c68b('0x28')][_0x10c68b('0xb')][_0x10c68b('0x22')](_0x4dda74)[_0x10c68b('0x25')](function(){const _0x54113d=_0x10c68b;logger[_0x54113d('0xc')](_0x54113d('0x17'),_0x4dda74);})[_0x10c68b('0x5')](function(_0x30c369){const _0x1ebf6c=_0x10c68b;logger[_0x1ebf6c('0xc')](JSON[_0x1ebf6c('0x24')](_0x30c369));});});},Migration[_0xb8fb53('0x1b')][_0xb8fb53('0x20')]=function(_0x52d3f7,_0x1f4438){const _0x1f235c=_0xb8fb53,_0x25d499=this;this[_0x1f235c('0x0')][_0x1f235c('0x29')](function(){const _0x16f9e3=_0x1f235c;return _0x25d499[_0x16f9e3('0x28')]['removeColumn'](_0x52d3f7,_0x1f4438)[_0x16f9e3('0x25')](function(){logger['info']('Removed\x20column\x20%s\x20from\x20%s',_0x1f4438,_0x52d3f7);})[_0x16f9e3('0x5')](function(_0x3037b3){const _0xeca1e=_0x16f9e3;logger[_0xeca1e('0xc')](util[_0xeca1e('0x2c')](_0x3037b3,{'showHidden':![],'depth':null}));});});},Migration[_0xb8fb53('0x1b')][_0xb8fb53('0x31')]=function(_0x1c3b53,_0x248582,_0x14c291){const _0x30f31c=_0xb8fb53,_0x42fd67=this;this[_0x30f31c('0x0')][_0x30f31c('0x29')](function(){const _0x34866a=_0x30f31c;return _0x42fd67[_0x34866a('0x28')][_0x34866a('0x31')](_0x1c3b53,_0x248582,_0x14c291)[_0x34866a('0x25')](function(){const _0x579c7b=_0x34866a;logger[_0x579c7b('0xc')](_0x579c7b('0x16'),_0x248582,_0x14c291,_0x1c3b53);})[_0x34866a('0x5')](function(_0xc79c49){const _0x7a38c2=_0x34866a;logger[_0x7a38c2('0xc')](util[_0x7a38c2('0x2c')](_0xc79c49,{'showHidden':![],'depth':null}));});});},Migration[_0xb8fb53('0x1b')]['final']=function(_0x140474){const _0x209926=_0xb8fb53;this[_0x209926('0x0')][_0x209926('0x29')](function(){return _0x140474();});},module[_0xb8fb53('0xa')]={'up':function(_0x51330b,_0x2ad6d9){return new Promise(function(_0x55e9fd){const _0x5e4faa=a945_0x2f55,_0xc22b34=new Migration(_0x51330b);_0xc22b34[_0x5e4faa('0x2a')](_0x5e4faa('0x2f'),_0x5e4faa('0x2d'),{'type':_0x2ad6d9[_0x5e4faa('0x15')]}),_0xc22b34[_0x5e4faa('0xd')](_0x5e4faa('0x1e'),'cc',{'type':_0x2ad6d9['TEXT']}),_0xc22b34[_0x5e4faa('0xd')](_0x5e4faa('0x1e'),'bcc',{'type':_0x2ad6d9[_0x5e4faa('0x15')]}),_0xc22b34[_0x5e4faa('0xd')](_0x5e4faa('0x1a'),_0x5e4faa('0x1d'),{'type':_0x2ad6d9[_0x5e4faa('0x1c')],'defaultValue':!![]}),_0xc22b34[_0x5e4faa('0xd')]('settings',_0x5e4faa('0x19'),{'type':_0x2ad6d9[_0x5e4faa('0x2e')],'defaultValue':0x1388}),_0xc22b34[_0x5e4faa('0xd')](_0x5e4faa('0x1a'),_0x5e4faa('0x7'),{'type':_0x2ad6d9[_0x5e4faa('0x2e')],'defaultValue':0x3e8}),_0xc22b34[_0x5e4faa('0xd')](_0x5e4faa('0x1a'),'splitSizeXlsx',{'type':_0x2ad6d9['INTEGER'],'defaultValue':0x1388}),_0xc22b34[_0x5e4faa('0xd')](_0x5e4faa('0x26'),_0x5e4faa('0x6'),{'type':_0x2ad6d9[_0x5e4faa('0x1c')],'defaultValue':![]}),_0xc22b34[_0x5e4faa('0xd')](_0x5e4faa('0x26'),'queueTransferTimeout',{'type':_0x2ad6d9[_0x5e4faa('0x2e')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0xc22b34[_0x5e4faa('0xd')]('mail_accounts','agentTransfer',{'type':_0x2ad6d9['BOOLEAN'],'defaultValue':![]}),_0xc22b34['addColumn'](_0x5e4faa('0x26'),_0x5e4faa('0x30'),{'type':_0x2ad6d9[_0x5e4faa('0x2e')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c}),_0xc22b34[_0x5e4faa('0xd')](_0x5e4faa('0x23'),_0x5e4faa('0xf'),{'type':_0x2ad6d9[_0x5e4faa('0x1c')],'defaultValue':![]}),_0xc22b34['changeColumn'](_0x5e4faa('0x14'),'subject',{'type':_0x2ad6d9['TEXT']('')+_0x5e4faa('0x3')}),_0xc22b34[_0x5e4faa('0x2a')](_0x5e4faa('0x14'),_0x5e4faa('0x2b'),{'type':_0x2ad6d9['TEXT'](_0x5e4faa('0x13'))+_0x5e4faa('0x3')}),_0xc22b34[_0x5e4faa('0xd')](_0x5e4faa('0x1'),_0x5e4faa('0xe'),{'type':_0x2ad6d9[_0x5e4faa('0x9')]}),_0xc22b34['final'](_0x55e9fd);});},'down':function(){}};
\ No newline at end of file