Built motion from commit aab208717af8d15f4fa224cdb6a202877019af9b. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.70.js
index 2bc2551..10555e8 100644 (file)
@@ -1 +1 @@
-const a948_0x449b=['report_call','prototype','dropTable','info','addIndex','catch','queryInterface','sequence','changeColumn','util','ALTER\x20TABLE\x20int_vtiger_accounts\x20ENCRYPTION=\x27Y\x27;','migration','final','Added\x20column\x20%s\x20to\x20%s','removeIndex\x20%s\x20%s','finally','stringify','then','tail','query\x20%s','addColumn','enqueue','query','removeColumn','../config/logger','mohtime','renameColumn','report_queue','inspect','table\x20dropped\x20%s','join','Removed\x20column\x20%s\x20from\x20%s','addIndex\x20%s\x20%s\x20%s','INTEGER'];(function(_0x20ac4a,_0x449b51){const _0x5a5a30=function(_0x492d67){while(--_0x492d67){_0x20ac4a['push'](_0x20ac4a['shift']());}};_0x5a5a30(++_0x449b51);}(a948_0x449b,0x11d));const a948_0x5a5a=function(_0x20ac4a,_0x449b51){_0x20ac4a=_0x20ac4a-0x0;let _0x5a5a30=a948_0x449b[_0x20ac4a];return _0x5a5a30;};const _0x148eef=a948_0x5a5a;'use strict';const util=require(_0x148eef('0x1e')),logger=require(_0x148eef('0xb'))(_0x148eef('0x20')),Sequence=function(){};Sequence[_0x148eef('0x16')][_0x148eef('0x8')]=function(_0x492d67){const _0x164970=_0x148eef;this['tail']=this[_0x164970('0x5')]?this['tail'][_0x164970('0x2')](_0x492d67):_0x492d67();};const Migration=function(_0x41b9cd){const _0x586a3d=_0x148eef;this[_0x586a3d('0x1b')]=_0x41b9cd,this[_0x586a3d('0x1c')]=new Sequence();};Migration[_0x148eef('0x16')]['changeColumn']=function(_0x30a0f1,_0x342886,_0x44c8f0){const _0x14b9d9=_0x148eef,_0x4ac550=this;this[_0x14b9d9('0x1c')]['enqueue'](function(){const _0x25e8c7=_0x14b9d9;return _0x4ac550[_0x25e8c7('0x1b')][_0x25e8c7('0x1d')](_0x30a0f1,_0x342886,_0x44c8f0)[_0x25e8c7('0x4')](function(){const _0x274423=_0x25e8c7;logger[_0x274423('0x18')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x342886,_0x30a0f1);})['catch'](function(_0x2c33ae){const _0x58aa48=_0x25e8c7;logger[_0x58aa48('0x18')](JSON[_0x58aa48('0x3')](_0x2c33ae));});});},Migration[_0x148eef('0x16')][_0x148eef('0x7')]=function(_0x556ee6,_0x2d1f01,_0x520419){const _0x4ae2d3=_0x148eef,_0x3b1005=this;this[_0x4ae2d3('0x1c')]['enqueue'](function(){const _0x3eee68=_0x4ae2d3;return _0x3b1005[_0x3eee68('0x1b')]['addColumn'](_0x556ee6,_0x2d1f01,_0x520419)[_0x3eee68('0x4')](function(){const _0x43559f=_0x3eee68;logger[_0x43559f('0x18')](_0x43559f('0x0'),_0x2d1f01,_0x556ee6);})[_0x3eee68('0x1a')](function(_0x1be954){const _0x582618=_0x3eee68;logger[_0x582618('0x18')](JSON[_0x582618('0x3')](_0x1be954));});});},Migration[_0x148eef('0x16')][_0x148eef('0x17')]=function(_0x5dec81){const _0xfceee8=_0x148eef,_0x6d768f=this;this[_0xfceee8('0x1c')][_0xfceee8('0x8')](function(){const _0xce82d5=_0xfceee8;return _0x6d768f[_0xce82d5('0x1b')][_0xce82d5('0x17')](_0x5dec81,{'force':!![]})[_0xce82d5('0x4')](function(){const _0x5d3b35=_0xce82d5;logger[_0x5d3b35('0x18')](_0x5d3b35('0x10'),_0x5dec81);})['catch'](function(_0x47f640){const _0xd1bdcc=_0xce82d5;logger[_0xd1bdcc('0x18')](JSON[_0xd1bdcc('0x3')](_0x47f640));});});},Migration[_0x148eef('0x16')][_0x148eef('0x19')]=function(_0x1e71d9,_0x3b1013,_0x1c011c){const _0x3cc02c=_0x148eef,_0x30cfbf=this;this[_0x3cc02c('0x1c')][_0x3cc02c('0x8')](function(){const _0x45ac5e=_0x3cc02c;return _0x30cfbf[_0x45ac5e('0x1b')][_0x45ac5e('0x19')](_0x1e71d9,_0x3b1013,{'indexName':_0x1c011c})[_0x45ac5e('0x4')](function(){const _0x484f4b=_0x45ac5e;logger[_0x484f4b('0x18')](_0x484f4b('0x13'),_0x1e71d9,_0x3b1013[_0x484f4b('0x11')](','),_0x1c011c);})[_0x45ac5e('0x1a')](function(_0x186a2c){const _0xd8ab8e=_0x45ac5e;logger[_0xd8ab8e('0x18')](JSON['stringify'](_0x186a2c));});});},Migration[_0x148eef('0x16')]['removeIndex']=function(_0x20fac9,_0x46dd5b){const _0x3e9d86=_0x148eef,_0x7b0263=this;this['sequence'][_0x3e9d86('0x8')](function(){const _0x495a63=_0x3e9d86;return _0x7b0263[_0x495a63('0x1b')]['removeIndex'](_0x20fac9,_0x46dd5b)[_0x495a63('0x4')](function(){const _0x2b8b2d=_0x495a63;logger[_0x2b8b2d('0x18')](_0x2b8b2d('0x1'),_0x20fac9,_0x46dd5b);})['catch'](function(_0x1df930){const _0x2e23eb=_0x495a63;logger[_0x2e23eb('0x18')](JSON[_0x2e23eb('0x3')](_0x1df930));});});},Migration['prototype'][_0x148eef('0x9')]=function(_0x565256){const _0x543c85=_0x148eef,_0x4bf476=this;this[_0x543c85('0x1c')][_0x543c85('0x8')](function(){const _0x31a4af=_0x543c85;return _0x4bf476['queryInterface']['sequelize'][_0x31a4af('0x9')](_0x565256)[_0x31a4af('0x4')](function(){const _0xc049e9=_0x31a4af;logger['info'](_0xc049e9('0x6'),_0x565256);})[_0x31a4af('0x1a')](function(_0x30352a){const _0x36d890=_0x31a4af;logger[_0x36d890('0x18')](JSON[_0x36d890('0x3')](_0x30352a));});});},Migration[_0x148eef('0x16')]['removeColumn']=function(_0x541422,_0x5388ff){const _0x28ba94=this;this['sequence']['enqueue'](function(){const _0x25236c=a948_0x5a5a;return _0x28ba94[_0x25236c('0x1b')][_0x25236c('0xa')](_0x541422,_0x5388ff)[_0x25236c('0x4')](function(){const _0x1d3a9d=_0x25236c;logger[_0x1d3a9d('0x18')](_0x1d3a9d('0x12'),_0x5388ff,_0x541422);})[_0x25236c('0x1a')](function(_0x58f84d){const _0x2e8ec2=_0x25236c;logger['info'](util[_0x2e8ec2('0xf')](_0x58f84d,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x148eef('0xd')]=function(_0x2e76d5,_0x395437,_0x1c04a1){const _0x94aad7=_0x148eef,_0x595838=this;this['sequence'][_0x94aad7('0x8')](function(){const _0x297dd2=_0x94aad7;return _0x595838[_0x297dd2('0x1b')][_0x297dd2('0xd')](_0x2e76d5,_0x395437,_0x1c04a1)[_0x297dd2('0x4')](function(){const _0x2b0382=_0x297dd2;logger[_0x2b0382('0x18')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x395437,_0x1c04a1,_0x2e76d5);})[_0x297dd2('0x1a')](function(_0x25ae4e){const _0x55e200=_0x297dd2;logger['info'](util[_0x55e200('0xf')](_0x25ae4e,{'showHidden':![],'depth':null}));});});},Migration[_0x148eef('0x16')][_0x148eef('0x21')]=function(_0xfbf67c){const _0x441fda=_0x148eef;this[_0x441fda('0x1c')]['enqueue'](function(){return _0xfbf67c();});},module['exports']={'up':function(_0x2196db,_0x2d1bc9){return new Promise(function(_0x2420cb){const _0x4d4074=a948_0x5a5a,_0x5c40f3=new Migration(_0x2196db);_0x5c40f3[_0x4d4074('0x7')](_0x4d4074('0xe'),'mohtime',{'type':_0x2d1bc9['INTEGER'],'defaultValue':0x0}),_0x5c40f3['addColumn'](_0x4d4074('0x15'),_0x4d4074('0xc'),{'type':_0x2d1bc9[_0x4d4074('0x14')],'defaultValue':0x0}),_0x5c40f3[_0x4d4074('0x9')](_0x4d4074('0x1f')),_0x5c40f3[_0x4d4074('0x21')](_0x2420cb);});},'down':function(){}};
\ No newline at end of file
+const a948_0x5e76=['report_queue','util','renameColumn','addColumn','../config/logger','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','then','addIndex','report_call','removeColumn','removeIndex','enqueue','final','removeIndex\x20%s\x20%s','tail','queryInterface','Added\x20column\x20%s\x20to\x20%s','changeColumn','table\x20dropped\x20%s','finally','Removed\x20column\x20%s\x20from\x20%s','addIndex\x20%s\x20%s\x20%s','migration','mohtime','inspect','sequence','catch','prototype','Changed\x20column\x20%s\x20in\x20table\x20%s','query','stringify','sequelize','ALTER\x20TABLE\x20int_vtiger_accounts\x20ENCRYPTION=\x27Y\x27;','info','join','exports'];(function(_0x368f0a,_0x5e7683){const _0xe042c0=function(_0x152260){while(--_0x152260){_0x368f0a['push'](_0x368f0a['shift']());}};_0xe042c0(++_0x5e7683);}(a948_0x5e76,0x17e));const a948_0xe042=function(_0x368f0a,_0x5e7683){_0x368f0a=_0x368f0a-0x0;let _0xe042c0=a948_0x5e76[_0x368f0a];return _0xe042c0;};const _0x49509c=a948_0xe042;'use strict';const util=require(_0x49509c('0xf')),logger=require(_0x49509c('0x12'))(_0x49509c('0x0')),Sequence=function(){};Sequence['prototype'][_0x49509c('0x19')]=function(_0x152260){const _0x8cd0c=_0x49509c;this['tail']=this[_0x8cd0c('0x1c')]?this['tail'][_0x8cd0c('0x21')](_0x152260):_0x152260();};const Migration=function(_0x5209da){const _0x1d38fb=_0x49509c;this[_0x1d38fb('0x1d')]=_0x5209da,this[_0x1d38fb('0x3')]=new Sequence();};Migration[_0x49509c('0x5')][_0x49509c('0x1f')]=function(_0x3ecc3d,_0x5e115a,_0x27a885){const _0x31768b=_0x49509c,_0x36781b=this;this[_0x31768b('0x3')][_0x31768b('0x19')](function(){const _0x13577e=_0x31768b;return _0x36781b[_0x13577e('0x1d')]['changeColumn'](_0x3ecc3d,_0x5e115a,_0x27a885)['then'](function(){const _0xf0f29c=_0x13577e;logger[_0xf0f29c('0xb')](_0xf0f29c('0x6'),_0x5e115a,_0x3ecc3d);})[_0x13577e('0x4')](function(_0x53f618){const _0x2fcf1a=_0x13577e;logger[_0x2fcf1a('0xb')](JSON[_0x2fcf1a('0x8')](_0x53f618));});});},Migration[_0x49509c('0x5')]['addColumn']=function(_0x2b0c6c,_0x45d8e0,_0x1d68d2){const _0x59b9a0=_0x49509c,_0x3feeab=this;this[_0x59b9a0('0x3')]['enqueue'](function(){const _0x98b254=_0x59b9a0;return _0x3feeab[_0x98b254('0x1d')][_0x98b254('0x11')](_0x2b0c6c,_0x45d8e0,_0x1d68d2)[_0x98b254('0x14')](function(){const _0x261bff=_0x98b254;logger[_0x261bff('0xb')](_0x261bff('0x1e'),_0x45d8e0,_0x2b0c6c);})[_0x98b254('0x4')](function(_0x3a6884){const _0x2a9c70=_0x98b254;logger[_0x2a9c70('0xb')](JSON[_0x2a9c70('0x8')](_0x3a6884));});});},Migration[_0x49509c('0x5')]['dropTable']=function(_0x1939cf){const _0x43c97c=_0x49509c,_0x1c577e=this;this[_0x43c97c('0x3')][_0x43c97c('0x19')](function(){const _0x3c4d46=_0x43c97c;return _0x1c577e[_0x3c4d46('0x1d')]['dropTable'](_0x1939cf,{'force':!![]})['then'](function(){const _0x4b322a=_0x3c4d46;logger[_0x4b322a('0xb')](_0x4b322a('0x20'),_0x1939cf);})[_0x3c4d46('0x4')](function(_0x4a2855){logger['info'](JSON['stringify'](_0x4a2855));});});},Migration[_0x49509c('0x5')][_0x49509c('0x15')]=function(_0x42bc4f,_0x1c70c3,_0x5e33c0){const _0xb0bdd5=this;this['sequence']['enqueue'](function(){const _0x28a182=a948_0xe042;return _0xb0bdd5['queryInterface'][_0x28a182('0x15')](_0x42bc4f,_0x1c70c3,{'indexName':_0x5e33c0})['then'](function(){const _0x58234a=_0x28a182;logger[_0x58234a('0xb')](_0x58234a('0x23'),_0x42bc4f,_0x1c70c3[_0x58234a('0xc')](','),_0x5e33c0);})[_0x28a182('0x4')](function(_0x3f9cf0){const _0x5846a7=_0x28a182;logger[_0x5846a7('0xb')](JSON[_0x5846a7('0x8')](_0x3f9cf0));});});},Migration['prototype'][_0x49509c('0x18')]=function(_0xb62dc3,_0x59dda6){const _0x4251b0=_0x49509c,_0x1240ca=this;this[_0x4251b0('0x3')][_0x4251b0('0x19')](function(){const _0x9fa000=_0x4251b0;return _0x1240ca['queryInterface'][_0x9fa000('0x18')](_0xb62dc3,_0x59dda6)[_0x9fa000('0x14')](function(){const _0x29979b=_0x9fa000;logger[_0x29979b('0xb')](_0x29979b('0x1b'),_0xb62dc3,_0x59dda6);})[_0x9fa000('0x4')](function(_0x3b99f7){const _0x3c19bf=_0x9fa000;logger[_0x3c19bf('0xb')](JSON[_0x3c19bf('0x8')](_0x3b99f7));});});},Migration[_0x49509c('0x5')]['query']=function(_0x29a5f3){const _0x1d6fa3=_0x49509c,_0x28b1d8=this;this[_0x1d6fa3('0x3')]['enqueue'](function(){const _0x5d5ed0=_0x1d6fa3;return _0x28b1d8[_0x5d5ed0('0x1d')][_0x5d5ed0('0x9')][_0x5d5ed0('0x7')](_0x29a5f3)['then'](function(){logger['info']('query\x20%s',_0x29a5f3);})[_0x5d5ed0('0x4')](function(_0x12ef73){logger['info'](JSON['stringify'](_0x12ef73));});});},Migration['prototype']['removeColumn']=function(_0x50c49b,_0x440b70){const _0x339b09=_0x49509c,_0x17311f=this;this[_0x339b09('0x3')][_0x339b09('0x19')](function(){const _0x34ffd9=_0x339b09;return _0x17311f[_0x34ffd9('0x1d')][_0x34ffd9('0x17')](_0x50c49b,_0x440b70)[_0x34ffd9('0x14')](function(){const _0x1cee7b=_0x34ffd9;logger['info'](_0x1cee7b('0x22'),_0x440b70,_0x50c49b);})[_0x34ffd9('0x4')](function(_0x9e5fe1){const _0x20c6a2=_0x34ffd9;logger[_0x20c6a2('0xb')](util[_0x20c6a2('0x2')](_0x9e5fe1,{'showHidden':![],'depth':null}));});});},Migration[_0x49509c('0x5')][_0x49509c('0x10')]=function(_0x5b2687,_0x504be2,_0x3d0910){const _0x41da88=_0x49509c,_0x54cce1=this;this['sequence'][_0x41da88('0x19')](function(){const _0xcd2474=_0x41da88;return _0x54cce1['queryInterface']['renameColumn'](_0x5b2687,_0x504be2,_0x3d0910)[_0xcd2474('0x14')](function(){const _0x4b16ce=_0xcd2474;logger[_0x4b16ce('0xb')](_0x4b16ce('0x13'),_0x504be2,_0x3d0910,_0x5b2687);})[_0xcd2474('0x4')](function(_0x16995b){const _0x2a34be=_0xcd2474;logger[_0x2a34be('0xb')](util[_0x2a34be('0x2')](_0x16995b,{'showHidden':![],'depth':null}));});});},Migration[_0x49509c('0x5')][_0x49509c('0x1a')]=function(_0x4c53b0){const _0x16b113=_0x49509c;this[_0x16b113('0x3')][_0x16b113('0x19')](function(){return _0x4c53b0();});},module[_0x49509c('0xd')]={'up':function(_0x35f4b0,_0x3d14e8){return new Promise(function(_0xf5e3b2){const _0x4d51dc=a948_0xe042,_0x3e4e73=new Migration(_0x35f4b0);_0x3e4e73['addColumn'](_0x4d51dc('0xe'),'mohtime',{'type':_0x3d14e8['INTEGER'],'defaultValue':0x0}),_0x3e4e73[_0x4d51dc('0x11')](_0x4d51dc('0x16'),_0x4d51dc('0x1'),{'type':_0x3d14e8['INTEGER'],'defaultValue':0x0}),_0x3e4e73[_0x4d51dc('0x7')](_0x4d51dc('0xa')),_0x3e4e73[_0x4d51dc('0x1a')](_0xf5e3b2);});},'down':function(){}};
\ No newline at end of file