Built motion from commit ded33658aad58fc8de845a8299a9db59a88cc353. Version 3.0.0...
[motion-next.git] / server / migrations / 2.4.2.js
index d49ada3..83bb1fe 100644 (file)
@@ -1 +1 @@
-const a1003_0x1172=['changeColumn','dropTable','util','BOOLEAN','query','then','removeIndex','final','indexName','blockedAt','allowedLoginAttempts','query\x20%s','sequelize','users','join','renameColumn','blocked','disabled','Changed\x20column\x20%s\x20in\x20table\x20%s','Added\x20column\x20%s\x20to\x20%s','migration','ALTER\x20TABLE\x20screen_recordings\x20ENCRYPTION=\x27Y\x27;','catch','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','addColumn','removeIndex\x20%s\x20%s','prototype','enqueue','info','inspect','removeColumn','queryInterface','settings','table\x20dropped\x20%s','sequence','finally','indicesType','blockDuration','INTEGER','Removed\x20column\x20%s\x20from\x20%s','../config/logger','stringify','loginAttempts','tail','DATE'];(function(_0x20fdcb,_0x1172a0){const _0x387542=function(_0x59b1b9){while(--_0x59b1b9){_0x20fdcb['push'](_0x20fdcb['shift']());}};_0x387542(++_0x1172a0);}(a1003_0x1172,0x1b2));const a1003_0x3875=function(_0x20fdcb,_0x1172a0){_0x20fdcb=_0x20fdcb-0x0;let _0x387542=a1003_0x1172[_0x20fdcb];return _0x387542;};const _0x2cd45a=a1003_0x3875;'use strict';const util=require(_0x2cd45a('0x12')),logger=require(_0x2cd45a('0xb'))(_0x2cd45a('0x24')),Sequence=function(){};Sequence[_0x2cd45a('0x2a')]['enqueue']=function(_0x59b1b9){const _0x1ef60b=_0x2cd45a;this['tail']=this[_0x1ef60b('0xe')]?this[_0x1ef60b('0xe')][_0x1ef60b('0x6')](_0x59b1b9):_0x59b1b9();};const Migration=function(_0x5ad79b){const _0x47f94a=_0x2cd45a;this[_0x47f94a('0x2')]=_0x5ad79b,this[_0x47f94a('0x5')]=new Sequence();};Migration[_0x2cd45a('0x2a')]['changeColumn']=function(_0x24e4d5,_0x1f3659,_0x51fb1a){const _0x2efdb0=_0x2cd45a,_0x357172=this;this[_0x2efdb0('0x5')][_0x2efdb0('0x2b')](function(){const _0x54ee75=_0x2efdb0;return _0x357172['queryInterface'][_0x54ee75('0x10')](_0x24e4d5,_0x1f3659,_0x51fb1a)[_0x54ee75('0x15')](function(){const _0x1156f2=_0x54ee75;logger[_0x1156f2('0x2c')](_0x1156f2('0x22'),_0x1f3659,_0x24e4d5);})[_0x54ee75('0x26')](function(_0x2701d6){const _0x5ba2d9=_0x54ee75;logger[_0x5ba2d9('0x2c')](JSON[_0x5ba2d9('0xc')](_0x2701d6));});});},Migration[_0x2cd45a('0x2a')][_0x2cd45a('0x28')]=function(_0x577ee8,_0x32fbb7,_0x536030){const _0x1f038a=_0x2cd45a,_0x34d40b=this;this[_0x1f038a('0x5')][_0x1f038a('0x2b')](function(){const _0x6877c6=_0x1f038a;return _0x34d40b[_0x6877c6('0x2')][_0x6877c6('0x28')](_0x577ee8,_0x32fbb7,_0x536030)[_0x6877c6('0x15')](function(){const _0xbba9a4=_0x6877c6;logger[_0xbba9a4('0x2c')](_0xbba9a4('0x23'),_0x32fbb7,_0x577ee8);})[_0x6877c6('0x26')](function(_0x3f129b){const _0x1be346=_0x6877c6;logger[_0x1be346('0x2c')](JSON[_0x1be346('0xc')](_0x3f129b));});});},Migration[_0x2cd45a('0x2a')]['dropTable']=function(_0x2f8575){const _0x46fa02=_0x2cd45a,_0x53a618=this;this[_0x46fa02('0x5')][_0x46fa02('0x2b')](function(){const _0x1327b3=_0x46fa02;return _0x53a618['queryInterface'][_0x1327b3('0x11')](_0x2f8575,{'force':!![]})[_0x1327b3('0x15')](function(){const _0x25a5ed=_0x1327b3;logger[_0x25a5ed('0x2c')](_0x25a5ed('0x4'),_0x2f8575);})['catch'](function(_0x54c701){const _0x126fbb=_0x1327b3;logger['info'](JSON[_0x126fbb('0xc')](_0x54c701));});});},Migration[_0x2cd45a('0x2a')]['addIndex']=function(_0x4eb50a,_0x149c02,_0x360a60){const _0x8a6798=_0x2cd45a,_0x58c8b8=this;this[_0x8a6798('0x5')]['enqueue'](function(){const _0x178f49=_0x8a6798;return _0x58c8b8[_0x178f49('0x2')]['addIndex'](_0x4eb50a,_0x149c02,{'indexName':_0x360a60[_0x178f49('0x18')],'indicesType':_0x360a60['indicesType']})[_0x178f49('0x15')](function(){const _0x5d342e=_0x178f49;logger[_0x5d342e('0x2c')]('addIndex\x20%s\x20%s\x20%s\x20[%s]',_0x4eb50a,_0x149c02[_0x5d342e('0x1e')](','),_0x360a60[_0x5d342e('0x18')],_0x360a60[_0x5d342e('0x7')]);})[_0x178f49('0x26')](function(_0x1da7bf){const _0x21f262=_0x178f49;logger[_0x21f262('0x2c')](JSON[_0x21f262('0xc')](_0x1da7bf));});});},Migration[_0x2cd45a('0x2a')][_0x2cd45a('0x16')]=function(_0xff7b8b,_0x342586){const _0x3fed7f=_0x2cd45a,_0x5b5534=this;this[_0x3fed7f('0x5')][_0x3fed7f('0x2b')](function(){const _0x3be876=_0x3fed7f;return _0x5b5534[_0x3be876('0x2')][_0x3be876('0x16')](_0xff7b8b,_0x342586)['then'](function(){const _0xafdf6b=_0x3be876;logger[_0xafdf6b('0x2c')](_0xafdf6b('0x29'),_0xff7b8b,_0x342586);})[_0x3be876('0x26')](function(_0x2bbd2b){const _0x4665b=_0x3be876;logger['info'](JSON[_0x4665b('0xc')](_0x2bbd2b));});});},Migration['prototype']['query']=function(_0x304af7){const _0x3c43d1=_0x2cd45a,_0x47c427=this;this[_0x3c43d1('0x5')]['enqueue'](function(){const _0x18683f=_0x3c43d1;return _0x47c427[_0x18683f('0x2')][_0x18683f('0x1c')][_0x18683f('0x14')](_0x304af7)['then'](function(){const _0x24b161=_0x18683f;logger[_0x24b161('0x2c')](_0x24b161('0x1b'),_0x304af7);})[_0x18683f('0x26')](function(_0x5d52ea){const _0x5ab90e=_0x18683f;logger['info'](JSON[_0x5ab90e('0xc')](_0x5d52ea));});});},Migration[_0x2cd45a('0x2a')][_0x2cd45a('0x1')]=function(_0x1fa858,_0x3b4641){const _0x227ddd=_0x2cd45a,_0x9751c8=this;this[_0x227ddd('0x5')]['enqueue'](function(){const _0x1dd22d=_0x227ddd;return _0x9751c8[_0x1dd22d('0x2')]['removeColumn'](_0x1fa858,_0x3b4641)['then'](function(){const _0x57580d=_0x1dd22d;logger[_0x57580d('0x2c')](_0x57580d('0xa'),_0x3b4641,_0x1fa858);})['catch'](function(_0x554f09){const _0x8007a4=_0x1dd22d;logger['info'](util[_0x8007a4('0x0')](_0x554f09,{'showHidden':![],'depth':null}));});});},Migration[_0x2cd45a('0x2a')][_0x2cd45a('0x1f')]=function(_0x7ca104,_0x26f5d7,_0xa04e8c){const _0x4fdae4=_0x2cd45a,_0x57a6b7=this;this[_0x4fdae4('0x5')][_0x4fdae4('0x2b')](function(){const _0x546cde=_0x4fdae4;return _0x57a6b7[_0x546cde('0x2')]['renameColumn'](_0x7ca104,_0x26f5d7,_0xa04e8c)['then'](function(){const _0x3bb2a1=_0x546cde;logger['info'](_0x3bb2a1('0x27'),_0x26f5d7,_0xa04e8c,_0x7ca104);})['catch'](function(_0xd2fb9e){logger['info'](util['inspect'](_0xd2fb9e,{'showHidden':![],'depth':null}));});});},Migration[_0x2cd45a('0x2a')][_0x2cd45a('0x17')]=function(_0x458934){const _0x1ce3ac=_0x2cd45a;this[_0x1ce3ac('0x5')][_0x1ce3ac('0x2b')](function(){return _0x458934();});},module['exports']={'up':function(_0x245018,_0x3a6b15){return new Promise(function(_0x193376){const _0x40262b=a1003_0x3875,_0x1a86fe=new Migration(_0x245018);_0x1a86fe[_0x40262b('0x28')]('settings',_0x40262b('0x1a'),{'type':_0x3a6b15[_0x40262b('0x9')],'defaultValue':0x5}),_0x1a86fe['addColumn'](_0x40262b('0x3'),_0x40262b('0x8'),{'type':_0x3a6b15[_0x40262b('0x9')],'defaultValue':0xa}),_0x1a86fe[_0x40262b('0x14')]('UPDATE\x20settings\x20SET\x20allowedLoginAttempts\x20=\x200,\x20blockDuration\x20=\x200;'),_0x1a86fe['addColumn'](_0x40262b('0x1d'),_0x40262b('0x20'),{'type':_0x3a6b15[_0x40262b('0x13')],'defaultValue':![]}),_0x1a86fe[_0x40262b('0x28')](_0x40262b('0x1d'),_0x40262b('0xd'),{'type':_0x3a6b15[_0x40262b('0x9')],'defaultValue':0x0}),_0x1a86fe['addColumn'](_0x40262b('0x1d'),_0x40262b('0x19'),{'type':_0x3a6b15[_0x40262b('0xf')],'defaultValue':null}),_0x1a86fe[_0x40262b('0x28')](_0x40262b('0x1d'),_0x40262b('0x21'),{'type':_0x3a6b15[_0x40262b('0x13')],'defaultValue':![]}),_0x1a86fe['query'](_0x40262b('0x25')),_0x1a86fe['final'](_0x193376);});},'down':function(){}};
\ No newline at end of file
+const a1003_0x4c00=['blocked','addColumn','then','queryInterface','Removed\x20column\x20%s\x20from\x20%s','join','migration','Added\x20column\x20%s\x20to\x20%s','BOOLEAN','renameColumn','DATE','indexName','loginAttempts','users','disabled','addIndex\x20%s\x20%s\x20%s\x20[%s]','stringify','INTEGER','Changed\x20column\x20%s\x20in\x20table\x20%s','tail','finally','query','prototype','catch','table\x20dropped\x20%s','blockedAt','enqueue','indicesType','removeColumn','changeColumn','removeIndex','dropTable','final','settings','sequence','inspect','addIndex','allowedLoginAttempts','info'];(function(_0xf08b50,_0x4c00ac){const _0x33d85f=function(_0x14e319){while(--_0x14e319){_0xf08b50['push'](_0xf08b50['shift']());}};_0x33d85f(++_0x4c00ac);}(a1003_0x4c00,0x1cc));const a1003_0x33d8=function(_0xf08b50,_0x4c00ac){_0xf08b50=_0xf08b50-0x0;let _0x33d85f=a1003_0x4c00[_0xf08b50];return _0x33d85f;};const _0x5b62db=a1003_0x33d8;'use strict';const util=require('util'),logger=require('../config/logger')(_0x5b62db('0xe')),Sequence=function(){};Sequence[_0x5b62db('0x1e')][_0x5b62db('0x22')]=function(_0x14e319){const _0x38c534=_0x5b62db;this[_0x38c534('0x1b')]=this[_0x38c534('0x1b')]?this[_0x38c534('0x1b')][_0x38c534('0x1c')](_0x14e319):_0x14e319();};const Migration=function(_0x3e456a){const _0x3ad7e1=_0x5b62db;this['queryInterface']=_0x3e456a,this[_0x3ad7e1('0x3')]=new Sequence();};Migration[_0x5b62db('0x1e')][_0x5b62db('0x25')]=function(_0x36cf04,_0x3fffbc,_0x2c2830){const _0x4d68a1=_0x5b62db,_0xe50fbd=this;this['sequence'][_0x4d68a1('0x22')](function(){const _0x1bc69b=_0x4d68a1;return _0xe50fbd[_0x1bc69b('0xb')][_0x1bc69b('0x25')](_0x36cf04,_0x3fffbc,_0x2c2830)[_0x1bc69b('0xa')](function(){const _0x318fdd=_0x1bc69b;logger[_0x318fdd('0x7')](_0x318fdd('0x1a'),_0x3fffbc,_0x36cf04);})[_0x1bc69b('0x1f')](function(_0x2d1cf2){const _0x13d682=_0x1bc69b;logger['info'](JSON[_0x13d682('0x18')](_0x2d1cf2));});});},Migration[_0x5b62db('0x1e')][_0x5b62db('0x9')]=function(_0x1d2f8a,_0x1fd514,_0x8fa3b4){const _0x57b9a4=_0x5b62db,_0x31f469=this;this['sequence'][_0x57b9a4('0x22')](function(){const _0x510b5d=_0x57b9a4;return _0x31f469[_0x510b5d('0xb')][_0x510b5d('0x9')](_0x1d2f8a,_0x1fd514,_0x8fa3b4)[_0x510b5d('0xa')](function(){const _0x348da0=_0x510b5d;logger[_0x348da0('0x7')](_0x348da0('0xf'),_0x1fd514,_0x1d2f8a);})['catch'](function(_0x478794){const _0x39e5e7=_0x510b5d;logger['info'](JSON[_0x39e5e7('0x18')](_0x478794));});});},Migration[_0x5b62db('0x1e')]['dropTable']=function(_0x57e637){const _0x2208ef=_0x5b62db,_0x213584=this;this[_0x2208ef('0x3')]['enqueue'](function(){const _0xcaea10=_0x2208ef;return _0x213584[_0xcaea10('0xb')][_0xcaea10('0x0')](_0x57e637,{'force':!![]})[_0xcaea10('0xa')](function(){const _0x29de7f=_0xcaea10;logger[_0x29de7f('0x7')](_0x29de7f('0x20'),_0x57e637);})[_0xcaea10('0x1f')](function(_0x2a4881){const _0x917237=_0xcaea10;logger[_0x917237('0x7')](JSON['stringify'](_0x2a4881));});});},Migration[_0x5b62db('0x1e')][_0x5b62db('0x5')]=function(_0x3565aa,_0xa00dda,_0x259855){const _0x5cf878=_0x5b62db,_0x324004=this;this['sequence'][_0x5cf878('0x22')](function(){const _0x137191=_0x5cf878;return _0x324004[_0x137191('0xb')][_0x137191('0x5')](_0x3565aa,_0xa00dda,{'indexName':_0x259855[_0x137191('0x13')],'indicesType':_0x259855[_0x137191('0x23')]})['then'](function(){const _0x391033=_0x137191;logger[_0x391033('0x7')](_0x391033('0x17'),_0x3565aa,_0xa00dda[_0x391033('0xd')](','),_0x259855[_0x391033('0x13')],_0x259855['indicesType']);})[_0x137191('0x1f')](function(_0x51b57b){const _0x5b5231=_0x137191;logger[_0x5b5231('0x7')](JSON[_0x5b5231('0x18')](_0x51b57b));});});},Migration[_0x5b62db('0x1e')][_0x5b62db('0x26')]=function(_0x221304,_0xd58e8){const _0xaf5f54=_0x5b62db,_0x376c4f=this;this[_0xaf5f54('0x3')][_0xaf5f54('0x22')](function(){const _0x1e4b32=_0xaf5f54;return _0x376c4f[_0x1e4b32('0xb')][_0x1e4b32('0x26')](_0x221304,_0xd58e8)['then'](function(){const _0x555af4=_0x1e4b32;logger[_0x555af4('0x7')]('removeIndex\x20%s\x20%s',_0x221304,_0xd58e8);})[_0x1e4b32('0x1f')](function(_0x155a8f){const _0x4d80ce=_0x1e4b32;logger[_0x4d80ce('0x7')](JSON['stringify'](_0x155a8f));});});},Migration['prototype'][_0x5b62db('0x1d')]=function(_0x27eaf4){const _0x50c37b=_0x5b62db,_0x5c8855=this;this[_0x50c37b('0x3')]['enqueue'](function(){const _0x2c6202=_0x50c37b;return _0x5c8855[_0x2c6202('0xb')]['sequelize'][_0x2c6202('0x1d')](_0x27eaf4)[_0x2c6202('0xa')](function(){const _0x32d2a=_0x2c6202;logger[_0x32d2a('0x7')]('query\x20%s',_0x27eaf4);})[_0x2c6202('0x1f')](function(_0x363a0d){const _0x4d41ff=_0x2c6202;logger['info'](JSON[_0x4d41ff('0x18')](_0x363a0d));});});},Migration[_0x5b62db('0x1e')][_0x5b62db('0x24')]=function(_0x304a3c,_0x1857f4){const _0x3910f2=_0x5b62db,_0x174ac5=this;this[_0x3910f2('0x3')][_0x3910f2('0x22')](function(){const _0x1261d5=_0x3910f2;return _0x174ac5[_0x1261d5('0xb')][_0x1261d5('0x24')](_0x304a3c,_0x1857f4)[_0x1261d5('0xa')](function(){const _0x29f7fa=_0x1261d5;logger[_0x29f7fa('0x7')](_0x29f7fa('0xc'),_0x1857f4,_0x304a3c);})[_0x1261d5('0x1f')](function(_0x25e2f3){const _0x3cf765=_0x1261d5;logger[_0x3cf765('0x7')](util[_0x3cf765('0x4')](_0x25e2f3,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x5b62db('0x11')]=function(_0x16d4c4,_0x43366e,_0x4ead76){const _0x960985=_0x5b62db,_0x26deee=this;this['sequence'][_0x960985('0x22')](function(){const _0x43847e=_0x960985;return _0x26deee[_0x43847e('0xb')][_0x43847e('0x11')](_0x16d4c4,_0x43366e,_0x4ead76)[_0x43847e('0xa')](function(){logger['info']('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x43366e,_0x4ead76,_0x16d4c4);})[_0x43847e('0x1f')](function(_0x2eb947){const _0xfe5592=_0x43847e;logger[_0xfe5592('0x7')](util[_0xfe5592('0x4')](_0x2eb947,{'showHidden':![],'depth':null}));});});},Migration[_0x5b62db('0x1e')][_0x5b62db('0x1')]=function(_0x5ef011){const _0x206643=_0x5b62db;this['sequence'][_0x206643('0x22')](function(){return _0x5ef011();});},module['exports']={'up':function(_0x299797,_0x4498eb){return new Promise(function(_0x25b01c){const _0x362f44=a1003_0x33d8,_0x55657c=new Migration(_0x299797);_0x55657c['addColumn']('settings',_0x362f44('0x6'),{'type':_0x4498eb[_0x362f44('0x19')],'defaultValue':0x5}),_0x55657c['addColumn'](_0x362f44('0x2'),'blockDuration',{'type':_0x4498eb[_0x362f44('0x19')],'defaultValue':0xa}),_0x55657c[_0x362f44('0x1d')]('UPDATE\x20settings\x20SET\x20allowedLoginAttempts\x20=\x200,\x20blockDuration\x20=\x200;'),_0x55657c[_0x362f44('0x9')](_0x362f44('0x15'),_0x362f44('0x8'),{'type':_0x4498eb[_0x362f44('0x10')],'defaultValue':![]}),_0x55657c[_0x362f44('0x9')](_0x362f44('0x15'),_0x362f44('0x14'),{'type':_0x4498eb['INTEGER'],'defaultValue':0x0}),_0x55657c[_0x362f44('0x9')](_0x362f44('0x15'),_0x362f44('0x21'),{'type':_0x4498eb[_0x362f44('0x12')],'defaultValue':null}),_0x55657c['addColumn']('users',_0x362f44('0x16'),{'type':_0x4498eb['BOOLEAN'],'defaultValue':![]}),_0x55657c[_0x362f44('0x1d')]('ALTER\x20TABLE\x20screen_recordings\x20ENCRYPTION=\x27Y\x27;'),_0x55657c[_0x362f44('0x1')](_0x25b01c);});},'down':function(){}};
\ No newline at end of file