Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.70.js
1 const a949_0x2b16=['removeIndex','sequence','stringify','migration','finally','renameColumn','Changed\x20column\x20%s\x20in\x20table\x20%s','sequelize','table\x20dropped\x20%s','tail','exports','../config/logger','final','addColumn','addIndex','catch','changeColumn','info','mohtime','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','queryInterface','addIndex\x20%s\x20%s\x20%s','removeIndex\x20%s\x20%s','util','dropTable','then','removeColumn','Added\x20column\x20%s\x20to\x20%s','report_queue','query','enqueue','ALTER\x20TABLE\x20int_vtiger_accounts\x20ENCRYPTION=\x27Y\x27;','Removed\x20column\x20%s\x20from\x20%s','INTEGER','prototype','report_call','inspect'];(function(_0x1ada08,_0x2b1687){const _0x5190ee=function(_0x5b7e2e){while(--_0x5b7e2e){_0x1ada08['push'](_0x1ada08['shift']());}};_0x5190ee(++_0x2b1687);}(a949_0x2b16,0x1f3));const a949_0x5190=function(_0x1ada08,_0x2b1687){_0x1ada08=_0x1ada08-0x0;let _0x5190ee=a949_0x2b16[_0x1ada08];return _0x5190ee;};const _0x204593=a949_0x5190;'use strict';const util=require(_0x204593('0x5')),logger=require(_0x204593('0x1e'))(_0x204593('0x16')),Sequence=function(){};Sequence['prototype'][_0x204593('0xc')]=function(_0x5b7e2e){const _0x3a4ed9=_0x204593;this[_0x3a4ed9('0x1c')]=this[_0x3a4ed9('0x1c')]?this[_0x3a4ed9('0x1c')][_0x3a4ed9('0x17')](_0x5b7e2e):_0x5b7e2e();};const Migration=function(_0xea0752){this['queryInterface']=_0xea0752,this['sequence']=new Sequence();};Migration[_0x204593('0x10')][_0x204593('0x23')]=function(_0xe8d5c3,_0x6e8b23,_0x70f818){const _0x4ec7f9=_0x204593,_0x118f1b=this;this[_0x4ec7f9('0x14')][_0x4ec7f9('0xc')](function(){const _0x1f25bc=_0x4ec7f9;return _0x118f1b[_0x1f25bc('0x2')][_0x1f25bc('0x23')](_0xe8d5c3,_0x6e8b23,_0x70f818)[_0x1f25bc('0x7')](function(){const _0x19b5a5=_0x1f25bc;logger[_0x19b5a5('0x24')](_0x19b5a5('0x19'),_0x6e8b23,_0xe8d5c3);})[_0x1f25bc('0x22')](function(_0x28871e){const _0x233ea7=_0x1f25bc;logger[_0x233ea7('0x24')](JSON[_0x233ea7('0x15')](_0x28871e));});});},Migration[_0x204593('0x10')]['addColumn']=function(_0x22c542,_0x57eb20,_0x21a3b7){const _0x56cb67=_0x204593,_0x36fcc6=this;this[_0x56cb67('0x14')][_0x56cb67('0xc')](function(){const _0x3eb5ac=_0x56cb67;return _0x36fcc6['queryInterface'][_0x3eb5ac('0x20')](_0x22c542,_0x57eb20,_0x21a3b7)[_0x3eb5ac('0x7')](function(){const _0x14fc3d=_0x3eb5ac;logger[_0x14fc3d('0x24')](_0x14fc3d('0x9'),_0x57eb20,_0x22c542);})[_0x3eb5ac('0x22')](function(_0x58183e){const _0x57133a=_0x3eb5ac;logger[_0x57133a('0x24')](JSON[_0x57133a('0x15')](_0x58183e));});});},Migration[_0x204593('0x10')][_0x204593('0x6')]=function(_0x308ed8){const _0x17213c=_0x204593,_0x89b29f=this;this[_0x17213c('0x14')][_0x17213c('0xc')](function(){const _0x586a27=_0x17213c;return _0x89b29f[_0x586a27('0x2')]['dropTable'](_0x308ed8,{'force':!![]})[_0x586a27('0x7')](function(){const _0x4ecb2e=_0x586a27;logger[_0x4ecb2e('0x24')](_0x4ecb2e('0x1b'),_0x308ed8);})[_0x586a27('0x22')](function(_0x247a38){const _0xdaee31=_0x586a27;logger[_0xdaee31('0x24')](JSON['stringify'](_0x247a38));});});},Migration[_0x204593('0x10')][_0x204593('0x21')]=function(_0x33a2f1,_0x10478a,_0xde88cf){const _0x3791a1=_0x204593,_0x489c7c=this;this['sequence'][_0x3791a1('0xc')](function(){const _0x1b8376=_0x3791a1;return _0x489c7c[_0x1b8376('0x2')][_0x1b8376('0x21')](_0x33a2f1,_0x10478a,{'indexName':_0xde88cf})['then'](function(){const _0x540fdb=_0x1b8376;logger[_0x540fdb('0x24')](_0x540fdb('0x3'),_0x33a2f1,_0x10478a['join'](','),_0xde88cf);})[_0x1b8376('0x22')](function(_0xf6e3ec){const _0x31ab7f=_0x1b8376;logger[_0x31ab7f('0x24')](JSON[_0x31ab7f('0x15')](_0xf6e3ec));});});},Migration[_0x204593('0x10')][_0x204593('0x13')]=function(_0x32d40f,_0x157057){const _0x5900ee=_0x204593,_0x38d38a=this;this[_0x5900ee('0x14')]['enqueue'](function(){const _0x3421bd=_0x5900ee;return _0x38d38a['queryInterface'][_0x3421bd('0x13')](_0x32d40f,_0x157057)[_0x3421bd('0x7')](function(){const _0x4ff4e4=_0x3421bd;logger[_0x4ff4e4('0x24')](_0x4ff4e4('0x4'),_0x32d40f,_0x157057);})[_0x3421bd('0x22')](function(_0x55713b){const _0x2666e4=_0x3421bd;logger[_0x2666e4('0x24')](JSON[_0x2666e4('0x15')](_0x55713b));});});},Migration[_0x204593('0x10')][_0x204593('0xb')]=function(_0x2e05cd){const _0x35d939=_0x204593,_0x50dbe6=this;this[_0x35d939('0x14')][_0x35d939('0xc')](function(){const _0x17b0c2=_0x35d939;return _0x50dbe6['queryInterface'][_0x17b0c2('0x1a')][_0x17b0c2('0xb')](_0x2e05cd)[_0x17b0c2('0x7')](function(){const _0x3b1f53=_0x17b0c2;logger[_0x3b1f53('0x24')]('query\x20%s',_0x2e05cd);})['catch'](function(_0x36c021){const _0x2a62d0=_0x17b0c2;logger[_0x2a62d0('0x24')](JSON[_0x2a62d0('0x15')](_0x36c021));});});},Migration[_0x204593('0x10')][_0x204593('0x8')]=function(_0x375dd0,_0xf46d35){const _0x276d94=_0x204593,_0x53096c=this;this[_0x276d94('0x14')]['enqueue'](function(){const _0x4d51f8=_0x276d94;return _0x53096c['queryInterface'][_0x4d51f8('0x8')](_0x375dd0,_0xf46d35)[_0x4d51f8('0x7')](function(){const _0x10df4d=_0x4d51f8;logger[_0x10df4d('0x24')](_0x10df4d('0xe'),_0xf46d35,_0x375dd0);})[_0x4d51f8('0x22')](function(_0x756ec5){const _0x1a7dcd=_0x4d51f8;logger[_0x1a7dcd('0x24')](util['inspect'](_0x756ec5,{'showHidden':![],'depth':null}));});});},Migration[_0x204593('0x10')][_0x204593('0x18')]=function(_0x278d52,_0x41fd8d,_0x567ece){const _0x13777e=_0x204593,_0x1c03ca=this;this[_0x13777e('0x14')]['enqueue'](function(){const _0x1b2ee9=_0x13777e;return _0x1c03ca[_0x1b2ee9('0x2')][_0x1b2ee9('0x18')](_0x278d52,_0x41fd8d,_0x567ece)[_0x1b2ee9('0x7')](function(){const _0x4534f9=_0x1b2ee9;logger[_0x4534f9('0x24')](_0x4534f9('0x1'),_0x41fd8d,_0x567ece,_0x278d52);})[_0x1b2ee9('0x22')](function(_0x4e9b5b){const _0x38a482=_0x1b2ee9;logger['info'](util[_0x38a482('0x12')](_0x4e9b5b,{'showHidden':![],'depth':null}));});});},Migration[_0x204593('0x10')][_0x204593('0x1f')]=function(_0x54bf90){const _0x188b30=_0x204593;this['sequence'][_0x188b30('0xc')](function(){return _0x54bf90();});},module[_0x204593('0x1d')]={'up':function(_0x25eb05,_0x258e68){return new Promise(function(_0x3aebf5){const _0x395ef1=a949_0x5190,_0x261936=new Migration(_0x25eb05);_0x261936[_0x395ef1('0x20')](_0x395ef1('0xa'),_0x395ef1('0x0'),{'type':_0x258e68[_0x395ef1('0xf')],'defaultValue':0x0}),_0x261936['addColumn'](_0x395ef1('0x11'),_0x395ef1('0x0'),{'type':_0x258e68[_0x395ef1('0xf')],'defaultValue':0x0}),_0x261936[_0x395ef1('0xb')](_0x395ef1('0xd')),_0x261936['final'](_0x3aebf5);});},'down':function(){}};