1a826742d1ba8f870fc52f25f651c35e1135c2d4
[motion-next.git] / server / migrations / 2.4.2.js
1 const a1003_0x4248=['join','settings','addIndex','query','finally','changeColumn','indexName','Changed\x20column\x20%s\x20in\x20table\x20%s','dropTable','BOOLEAN','removeColumn','removeIndex\x20%s\x20%s','exports','queryInterface','query\x20%s','../config/logger','sequence','info','util','removeIndex','then','indicesType','blocked','final','tail','stringify','enqueue','DATE','migration','users','prototype','inspect','disabled','addColumn','addIndex\x20%s\x20%s\x20%s\x20[%s]','blockedAt','ALTER\x20TABLE\x20screen_recordings\x20ENCRYPTION=\x27Y\x27;','INTEGER','Removed\x20column\x20%s\x20from\x20%s','catch','renameColumn','allowedLoginAttempts','loginAttempts'];(function(_0x8eaec4,_0x42480d){const _0x42bd5c=function(_0x58fea2){while(--_0x58fea2){_0x8eaec4['push'](_0x8eaec4['shift']());}};_0x42bd5c(++_0x42480d);}(a1003_0x4248,0xb8));const a1003_0x42bd=function(_0x8eaec4,_0x42480d){_0x8eaec4=_0x8eaec4-0x0;let _0x42bd5c=a1003_0x4248[_0x8eaec4];return _0x42bd5c;};const _0x5dc547=a1003_0x42bd;'use strict';const util=require(_0x5dc547('0x6')),logger=require(_0x5dc547('0x3'))(_0x5dc547('0x10')),Sequence=function(){};Sequence['prototype']['enqueue']=function(_0x58fea2){const _0x21e705=_0x5dc547;this[_0x21e705('0xc')]=this['tail']?this[_0x21e705('0xc')][_0x21e705('0x23')](_0x58fea2):_0x58fea2();};const Migration=function(_0x295a23){const _0x9a2ff2=_0x5dc547;this[_0x9a2ff2('0x1')]=_0x295a23,this[_0x9a2ff2('0x4')]=new Sequence();};Migration['prototype'][_0x5dc547('0x24')]=function(_0x1f7ed1,_0x1cdc83,_0x57c368){const _0x930fe9=_0x5dc547,_0x3aa72b=this;this[_0x930fe9('0x4')][_0x930fe9('0xe')](function(){const _0x3178e3=_0x930fe9;return _0x3aa72b['queryInterface']['changeColumn'](_0x1f7ed1,_0x1cdc83,_0x57c368)[_0x3178e3('0x8')](function(){const _0x4e3199=_0x3178e3;logger[_0x4e3199('0x5')](_0x4e3199('0x26'),_0x1cdc83,_0x1f7ed1);})[_0x3178e3('0x1b')](function(_0x5c3977){const _0xa3ce48=_0x3178e3;logger[_0xa3ce48('0x5')](JSON['stringify'](_0x5c3977));});});},Migration[_0x5dc547('0x12')][_0x5dc547('0x15')]=function(_0x1a9e52,_0x4acc3d,_0x1dd6e5){const _0x53497e=_0x5dc547,_0xb806e1=this;this['sequence'][_0x53497e('0xe')](function(){const _0x336600=_0x53497e;return _0xb806e1[_0x336600('0x1')]['addColumn'](_0x1a9e52,_0x4acc3d,_0x1dd6e5)[_0x336600('0x8')](function(){const _0x560322=_0x336600;logger[_0x560322('0x5')]('Added\x20column\x20%s\x20to\x20%s',_0x4acc3d,_0x1a9e52);})[_0x336600('0x1b')](function(_0x535ff0){const _0x517d6f=_0x336600;logger['info'](JSON[_0x517d6f('0xd')](_0x535ff0));});});},Migration[_0x5dc547('0x12')][_0x5dc547('0x27')]=function(_0x19e307){const _0x5bb6e2=_0x5dc547,_0x2cd16d=this;this[_0x5bb6e2('0x4')][_0x5bb6e2('0xe')](function(){const _0x4ad701=_0x5bb6e2;return _0x2cd16d['queryInterface'][_0x4ad701('0x27')](_0x19e307,{'force':!![]})[_0x4ad701('0x8')](function(){const _0x1c9f0f=_0x4ad701;logger[_0x1c9f0f('0x5')]('table\x20dropped\x20%s',_0x19e307);})[_0x4ad701('0x1b')](function(_0x4a115a){const _0x12fe3d=_0x4ad701;logger[_0x12fe3d('0x5')](JSON[_0x12fe3d('0xd')](_0x4a115a));});});},Migration[_0x5dc547('0x12')][_0x5dc547('0x21')]=function(_0xfb1f35,_0x192e17,_0x1f1d7f){const _0x55a0bb=_0x5dc547,_0x22412d=this;this[_0x55a0bb('0x4')][_0x55a0bb('0xe')](function(){const _0x1782d1=_0x55a0bb;return _0x22412d[_0x1782d1('0x1')][_0x1782d1('0x21')](_0xfb1f35,_0x192e17,{'indexName':_0x1f1d7f[_0x1782d1('0x25')],'indicesType':_0x1f1d7f['indicesType']})[_0x1782d1('0x8')](function(){const _0x5d4759=_0x1782d1;logger[_0x5d4759('0x5')](_0x5d4759('0x16'),_0xfb1f35,_0x192e17[_0x5d4759('0x1f')](','),_0x1f1d7f[_0x5d4759('0x25')],_0x1f1d7f[_0x5d4759('0x9')]);})[_0x1782d1('0x1b')](function(_0x309324){const _0x5daa00=_0x1782d1;logger[_0x5daa00('0x5')](JSON[_0x5daa00('0xd')](_0x309324));});});},Migration[_0x5dc547('0x12')][_0x5dc547('0x7')]=function(_0xb7a7da,_0x2001eb){const _0x23b550=_0x5dc547,_0x113482=this;this['sequence'][_0x23b550('0xe')](function(){const _0x22046c=_0x23b550;return _0x113482[_0x22046c('0x1')]['removeIndex'](_0xb7a7da,_0x2001eb)[_0x22046c('0x8')](function(){const _0xed2839=_0x22046c;logger[_0xed2839('0x5')](_0xed2839('0x2a'),_0xb7a7da,_0x2001eb);})[_0x22046c('0x1b')](function(_0x2830d5){const _0x3fa3e0=_0x22046c;logger[_0x3fa3e0('0x5')](JSON[_0x3fa3e0('0xd')](_0x2830d5));});});},Migration[_0x5dc547('0x12')][_0x5dc547('0x22')]=function(_0x41a256){const _0x17dd1d=_0x5dc547,_0x3f2779=this;this['sequence'][_0x17dd1d('0xe')](function(){const _0x1dee7f=_0x17dd1d;return _0x3f2779[_0x1dee7f('0x1')]['sequelize'][_0x1dee7f('0x22')](_0x41a256)[_0x1dee7f('0x8')](function(){const _0x4ebca6=_0x1dee7f;logger['info'](_0x4ebca6('0x2'),_0x41a256);})['catch'](function(_0x5d3557){const _0x13fc3b=_0x1dee7f;logger[_0x13fc3b('0x5')](JSON[_0x13fc3b('0xd')](_0x5d3557));});});},Migration[_0x5dc547('0x12')][_0x5dc547('0x29')]=function(_0x5cb5ad,_0x2b392b){const _0x4ee257=_0x5dc547,_0x254e8c=this;this['sequence'][_0x4ee257('0xe')](function(){const _0x31cf8d=_0x4ee257;return _0x254e8c[_0x31cf8d('0x1')]['removeColumn'](_0x5cb5ad,_0x2b392b)['then'](function(){const _0x1905af=_0x31cf8d;logger[_0x1905af('0x5')](_0x1905af('0x1a'),_0x2b392b,_0x5cb5ad);})['catch'](function(_0x20f370){const _0x11f4ee=_0x31cf8d;logger[_0x11f4ee('0x5')](util[_0x11f4ee('0x13')](_0x20f370,{'showHidden':![],'depth':null}));});});},Migration[_0x5dc547('0x12')][_0x5dc547('0x1c')]=function(_0x3faec9,_0x629744,_0x2d8c3a){const _0x56bb2=_0x5dc547,_0x1fbcc1=this;this[_0x56bb2('0x4')][_0x56bb2('0xe')](function(){const _0x1476fc=_0x56bb2;return _0x1fbcc1[_0x1476fc('0x1')][_0x1476fc('0x1c')](_0x3faec9,_0x629744,_0x2d8c3a)['then'](function(){const _0x1caf09=_0x1476fc;logger[_0x1caf09('0x5')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x629744,_0x2d8c3a,_0x3faec9);})['catch'](function(_0x1d78f2){const _0x532ae8=_0x1476fc;logger[_0x532ae8('0x5')](util[_0x532ae8('0x13')](_0x1d78f2,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x5dc547('0xb')]=function(_0x43cb51){const _0x325ade=_0x5dc547;this['sequence'][_0x325ade('0xe')](function(){return _0x43cb51();});},module[_0x5dc547('0x0')]={'up':function(_0x50fa90,_0x2dd1de){return new Promise(function(_0xb43e5b){const _0xb092c7=a1003_0x42bd,_0x5df7f8=new Migration(_0x50fa90);_0x5df7f8[_0xb092c7('0x15')](_0xb092c7('0x20'),_0xb092c7('0x1d'),{'type':_0x2dd1de[_0xb092c7('0x19')],'defaultValue':0x5}),_0x5df7f8[_0xb092c7('0x15')](_0xb092c7('0x20'),'blockDuration',{'type':_0x2dd1de[_0xb092c7('0x19')],'defaultValue':0xa}),_0x5df7f8[_0xb092c7('0x22')]('UPDATE\x20settings\x20SET\x20allowedLoginAttempts\x20=\x200,\x20blockDuration\x20=\x200;'),_0x5df7f8[_0xb092c7('0x15')](_0xb092c7('0x11'),_0xb092c7('0xa'),{'type':_0x2dd1de[_0xb092c7('0x28')],'defaultValue':![]}),_0x5df7f8[_0xb092c7('0x15')](_0xb092c7('0x11'),_0xb092c7('0x1e'),{'type':_0x2dd1de[_0xb092c7('0x19')],'defaultValue':0x0}),_0x5df7f8['addColumn']('users',_0xb092c7('0x17'),{'type':_0x2dd1de[_0xb092c7('0xf')],'defaultValue':null}),_0x5df7f8[_0xb092c7('0x15')]('users',_0xb092c7('0x14'),{'type':_0x2dd1de[_0xb092c7('0x28')],'defaultValue':![]}),_0x5df7f8[_0xb092c7('0x22')](_0xb092c7('0x18')),_0x5df7f8[_0xb092c7('0xb')](_0xb43e5b);});},'down':function(){}};