ba4feb8d28291fbf621243696ad8b5184d077f86
[motion-next.git] / server / migrations / 2.4.20.js
1 const a1004_0x3638=['sequelize','then','catch','dropTable','migration','final','query\x20%s','inspect','googleSsoEnabled','addIndex','Removed\x20column\x20%s\x20from\x20%s','removeIndex','indexName','join','finally','UPDATE\x20settings\x20SET\x20googleSsoEnabled\x20=\x201','removeColumn','addColumn','prototype','settings','changeColumn','addIndex\x20%s\x20%s\x20%s\x20[%s]','stringify','tail','queryInterface','exports','renameColumn','Changed\x20column\x20%s\x20in\x20table\x20%s','indicesType','BOOLEAN','util','query','info','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','removeIndex\x20%s\x20%s','sequence','enqueue'];(function(_0x3c4f27,_0x3638c2){const _0x33141f=function(_0x4358d6){while(--_0x4358d6){_0x3c4f27['push'](_0x3c4f27['shift']());}};_0x33141f(++_0x3638c2);}(a1004_0x3638,0xfc));const a1004_0x3314=function(_0x3c4f27,_0x3638c2){_0x3c4f27=_0x3c4f27-0x0;let _0x33141f=a1004_0x3638[_0x3c4f27];return _0x33141f;};const _0x513d24=a1004_0x3314;'use strict';const util=require(_0x513d24('0x0')),logger=require('../config/logger')(_0x513d24('0xb')),Sequence=function(){};Sequence[_0x513d24('0x19')][_0x513d24('0x6')]=function(_0x4358d6){const _0x36e36a=_0x513d24;this[_0x36e36a('0x1e')]=this[_0x36e36a('0x1e')]?this[_0x36e36a('0x1e')][_0x36e36a('0x15')](_0x4358d6):_0x4358d6();};const Migration=function(_0x6827b){const _0x4ff48a=_0x513d24;this[_0x4ff48a('0x1f')]=_0x6827b,this[_0x4ff48a('0x5')]=new Sequence();};Migration[_0x513d24('0x19')][_0x513d24('0x1b')]=function(_0x3b7ae3,_0x31caa1,_0x449679){const _0x471dfd=_0x513d24,_0x2414aa=this;this[_0x471dfd('0x5')]['enqueue'](function(){const _0x399bcc=_0x471dfd;return _0x2414aa['queryInterface'][_0x399bcc('0x1b')](_0x3b7ae3,_0x31caa1,_0x449679)['then'](function(){const _0x1b2e5a=_0x399bcc;logger[_0x1b2e5a('0x2')](_0x1b2e5a('0x22'),_0x31caa1,_0x3b7ae3);})['catch'](function(_0x5c59fc){const _0xd4d107=_0x399bcc;logger[_0xd4d107('0x2')](JSON[_0xd4d107('0x1d')](_0x5c59fc));});});},Migration['prototype']['addColumn']=function(_0x58c96c,_0x2cd10f,_0x35738c){const _0x24abad=_0x513d24,_0x2e0d3c=this;this[_0x24abad('0x5')][_0x24abad('0x6')](function(){const _0x58a552=_0x24abad;return _0x2e0d3c[_0x58a552('0x1f')][_0x58a552('0x18')](_0x58c96c,_0x2cd10f,_0x35738c)[_0x58a552('0x8')](function(){const _0xc67a58=_0x58a552;logger[_0xc67a58('0x2')]('Added\x20column\x20%s\x20to\x20%s',_0x2cd10f,_0x58c96c);})[_0x58a552('0x9')](function(_0x36cbf7){const _0x2805e2=_0x58a552;logger['info'](JSON[_0x2805e2('0x1d')](_0x36cbf7));});});},Migration[_0x513d24('0x19')][_0x513d24('0xa')]=function(_0x29fe75){const _0x42b45d=_0x513d24,_0xeb01a5=this;this[_0x42b45d('0x5')]['enqueue'](function(){const _0x12556f=_0x42b45d;return _0xeb01a5['queryInterface'][_0x12556f('0xa')](_0x29fe75,{'force':!![]})[_0x12556f('0x8')](function(){const _0x3bb41=_0x12556f;logger[_0x3bb41('0x2')]('table\x20dropped\x20%s',_0x29fe75);})[_0x12556f('0x9')](function(_0x393c8a){const _0x41cd2c=_0x12556f;logger[_0x41cd2c('0x2')](JSON[_0x41cd2c('0x1d')](_0x393c8a));});});},Migration[_0x513d24('0x19')][_0x513d24('0x10')]=function(_0x3c65df,_0x203b32,_0x35ce7){const _0x10a3d6=_0x513d24,_0x433074=this;this[_0x10a3d6('0x5')][_0x10a3d6('0x6')](function(){const _0x474e01=_0x10a3d6;return _0x433074[_0x474e01('0x1f')][_0x474e01('0x10')](_0x3c65df,_0x203b32,{'indexName':_0x35ce7[_0x474e01('0x13')],'indicesType':_0x35ce7[_0x474e01('0x23')]})[_0x474e01('0x8')](function(){const _0x55c378=_0x474e01;logger[_0x55c378('0x2')](_0x55c378('0x1c'),_0x3c65df,_0x203b32[_0x55c378('0x14')](','),_0x35ce7[_0x55c378('0x13')],_0x35ce7['indicesType']);})[_0x474e01('0x9')](function(_0x5f99bb){const _0x12dc31=_0x474e01;logger[_0x12dc31('0x2')](JSON['stringify'](_0x5f99bb));});});},Migration[_0x513d24('0x19')]['removeIndex']=function(_0x1fc474,_0x3a22ca){const _0x1fb73a=this;this['sequence']['enqueue'](function(){const _0x4fbba0=a1004_0x3314;return _0x1fb73a[_0x4fbba0('0x1f')][_0x4fbba0('0x12')](_0x1fc474,_0x3a22ca)[_0x4fbba0('0x8')](function(){const _0x8b1bba=_0x4fbba0;logger[_0x8b1bba('0x2')](_0x8b1bba('0x4'),_0x1fc474,_0x3a22ca);})[_0x4fbba0('0x9')](function(_0xed07df){const _0x53e795=_0x4fbba0;logger[_0x53e795('0x2')](JSON[_0x53e795('0x1d')](_0xed07df));});});},Migration[_0x513d24('0x19')]['query']=function(_0x385a1b){const _0x443dcf=_0x513d24,_0x3cbad0=this;this[_0x443dcf('0x5')]['enqueue'](function(){const _0x3233f4=_0x443dcf;return _0x3cbad0[_0x3233f4('0x1f')][_0x3233f4('0x7')][_0x3233f4('0x1')](_0x385a1b)['then'](function(){const _0x5a149c=_0x3233f4;logger[_0x5a149c('0x2')](_0x5a149c('0xd'),_0x385a1b);})[_0x3233f4('0x9')](function(_0x49a80a){const _0x59ccc=_0x3233f4;logger[_0x59ccc('0x2')](JSON[_0x59ccc('0x1d')](_0x49a80a));});});},Migration[_0x513d24('0x19')][_0x513d24('0x17')]=function(_0x143efc,_0x4046bb){const _0x15e68d=_0x513d24,_0x5d6b5f=this;this['sequence'][_0x15e68d('0x6')](function(){const _0x165a65=_0x15e68d;return _0x5d6b5f[_0x165a65('0x1f')][_0x165a65('0x17')](_0x143efc,_0x4046bb)['then'](function(){const _0x343e77=_0x165a65;logger[_0x343e77('0x2')](_0x343e77('0x11'),_0x4046bb,_0x143efc);})[_0x165a65('0x9')](function(_0x1fdf1f){const _0x48448a=_0x165a65;logger[_0x48448a('0x2')](util[_0x48448a('0xe')](_0x1fdf1f,{'showHidden':![],'depth':null}));});});},Migration[_0x513d24('0x19')][_0x513d24('0x21')]=function(_0x4ac219,_0xbc4fa1,_0x59c5a7){const _0x56abda=_0x513d24,_0x2693dc=this;this[_0x56abda('0x5')][_0x56abda('0x6')](function(){const _0xd68a86=_0x56abda;return _0x2693dc[_0xd68a86('0x1f')][_0xd68a86('0x21')](_0x4ac219,_0xbc4fa1,_0x59c5a7)[_0xd68a86('0x8')](function(){const _0x100800=_0xd68a86;logger[_0x100800('0x2')](_0x100800('0x3'),_0xbc4fa1,_0x59c5a7,_0x4ac219);})[_0xd68a86('0x9')](function(_0x462c89){const _0x540678=_0xd68a86;logger['info'](util[_0x540678('0xe')](_0x462c89,{'showHidden':![],'depth':null}));});});},Migration[_0x513d24('0x19')][_0x513d24('0xc')]=function(_0x9b0915){this['sequence']['enqueue'](function(){return _0x9b0915();});},module[_0x513d24('0x20')]={'up':function(_0x4d457f,_0x22b5fb){return new Promise(function(_0x4981d0){const _0x1ba7d4=a1004_0x3314,_0x1b40e0=new Migration(_0x4d457f);_0x1b40e0[_0x1ba7d4('0x18')](_0x1ba7d4('0x1a'),_0x1ba7d4('0xf'),{'type':_0x22b5fb[_0x1ba7d4('0x24')],'defaultValue':![]}),_0x1b40e0[_0x1ba7d4('0x1')](_0x1ba7d4('0x16')),_0x1b40e0[_0x1ba7d4('0xc')](_0x4981d0);});},'down':function(){}};