79518d6b17a468a9a57720c35d7a9acc1379669f
[motion-next.git] / server / migrations / 2.3.8.js
1 const a981_0x5e69=['query\x20%s','stringify','addIndex','final','Removed\x20column\x20%s\x20from\x20%s','finally','queryInterface','addColumn','removeIndex','inspect','../config/logger','Added\x20column\x20%s\x20to\x20%s','query','info','sequence','catch','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','exports','util','enqueue','renameColumn','removeColumn','then','changeColumn','prototype','tail','addIndex\x20%s\x20%s\x20%s','Changed\x20column\x20%s\x20in\x20table\x20%s'];(function(_0x3f6126,_0x5e697d){const _0x43b280=function(_0x480e52){while(--_0x480e52){_0x3f6126['push'](_0x3f6126['shift']());}};_0x43b280(++_0x5e697d);}(a981_0x5e69,0x102));const a981_0x43b2=function(_0x3f6126,_0x5e697d){_0x3f6126=_0x3f6126-0x0;let _0x43b280=a981_0x5e69[_0x3f6126];return _0x43b280;};const _0x4613bb=a981_0x43b2;'use strict';const util=require(_0x4613bb('0xc')),logger=require(_0x4613bb('0x4'))('migration'),Sequence=function(){};Sequence[_0x4613bb('0x12')][_0x4613bb('0xd')]=function(_0x480e52){const _0x11e060=_0x4613bb;this[_0x11e060('0x13')]=this['tail']?this[_0x11e060('0x13')][_0x11e060('0x1b')](_0x480e52):_0x480e52();};const Migration=function(_0x54f09c){const _0x39f8ea=_0x4613bb;this[_0x39f8ea('0x0')]=_0x54f09c,this[_0x39f8ea('0x8')]=new Sequence();};Migration[_0x4613bb('0x12')][_0x4613bb('0x11')]=function(_0x3b7e36,_0x42b3f4,_0x425354){const _0x1ee2da=_0x4613bb,_0x34f67e=this;this[_0x1ee2da('0x8')]['enqueue'](function(){const _0x23ae5a=_0x1ee2da;return _0x34f67e[_0x23ae5a('0x0')]['changeColumn'](_0x3b7e36,_0x42b3f4,_0x425354)[_0x23ae5a('0x10')](function(){const _0x7ed781=_0x23ae5a;logger[_0x7ed781('0x7')](_0x7ed781('0x15'),_0x42b3f4,_0x3b7e36);})['catch'](function(_0x190374){const _0x1bf675=_0x23ae5a;logger[_0x1bf675('0x7')](JSON[_0x1bf675('0x17')](_0x190374));});});},Migration[_0x4613bb('0x12')][_0x4613bb('0x1')]=function(_0x484b00,_0xf54cda,_0x3be713){const _0x4c9f92=this;this['sequence']['enqueue'](function(){const _0x30add2=a981_0x43b2;return _0x4c9f92[_0x30add2('0x0')][_0x30add2('0x1')](_0x484b00,_0xf54cda,_0x3be713)['then'](function(){const _0x305e22=_0x30add2;logger[_0x305e22('0x7')](_0x305e22('0x5'),_0xf54cda,_0x484b00);})[_0x30add2('0x9')](function(_0xab93cc){const _0x3b8b87=_0x30add2;logger[_0x3b8b87('0x7')](JSON[_0x3b8b87('0x17')](_0xab93cc));});});},Migration[_0x4613bb('0x12')]['dropTable']=function(_0x5c82c8){const _0x464761=_0x4613bb,_0x126dc0=this;this[_0x464761('0x8')]['enqueue'](function(){const _0x4047c8=_0x464761;return _0x126dc0[_0x4047c8('0x0')]['dropTable'](_0x5c82c8,{'force':!![]})[_0x4047c8('0x10')](function(){const _0x546a3d=_0x4047c8;logger[_0x546a3d('0x7')]('table\x20dropped\x20%s',_0x5c82c8);})[_0x4047c8('0x9')](function(_0x1dcc6d){const _0x5da688=_0x4047c8;logger[_0x5da688('0x7')](JSON[_0x5da688('0x17')](_0x1dcc6d));});});},Migration[_0x4613bb('0x12')][_0x4613bb('0x18')]=function(_0x10eb18,_0x2bf560,_0x4ab203){const _0xaf67a5=this;this['sequence']['enqueue'](function(){const _0x128ea1=a981_0x43b2;return _0xaf67a5[_0x128ea1('0x0')][_0x128ea1('0x18')](_0x10eb18,_0x2bf560,{'indexName':_0x4ab203})[_0x128ea1('0x10')](function(){const _0x7c300e=_0x128ea1;logger[_0x7c300e('0x7')](_0x7c300e('0x14'),_0x10eb18,_0x2bf560['join'](','),_0x4ab203);})[_0x128ea1('0x9')](function(_0x3b7107){const _0x319ead=_0x128ea1;logger[_0x319ead('0x7')](JSON[_0x319ead('0x17')](_0x3b7107));});});},Migration['prototype'][_0x4613bb('0x2')]=function(_0x244766,_0x2cf693){const _0x585386=_0x4613bb,_0xd0e22c=this;this[_0x585386('0x8')][_0x585386('0xd')](function(){const _0x2cd450=_0x585386;return _0xd0e22c[_0x2cd450('0x0')][_0x2cd450('0x2')](_0x244766,_0x2cf693)[_0x2cd450('0x10')](function(){logger['info']('removeIndex\x20%s\x20%s',_0x244766,_0x2cf693);})[_0x2cd450('0x9')](function(_0x4ace53){const _0x36165b=_0x2cd450;logger['info'](JSON[_0x36165b('0x17')](_0x4ace53));});});},Migration[_0x4613bb('0x12')][_0x4613bb('0x6')]=function(_0x2ce0f2){const _0x50dd4b=_0x4613bb,_0x20accf=this;this['sequence'][_0x50dd4b('0xd')](function(){const _0x2fa700=_0x50dd4b;return _0x20accf[_0x2fa700('0x0')]['sequelize']['query'](_0x2ce0f2)[_0x2fa700('0x10')](function(){const _0x40d0a2=_0x2fa700;logger['info'](_0x40d0a2('0x16'),_0x2ce0f2);})[_0x2fa700('0x9')](function(_0x59813c){const _0x21108a=_0x2fa700;logger[_0x21108a('0x7')](JSON[_0x21108a('0x17')](_0x59813c));});});},Migration[_0x4613bb('0x12')][_0x4613bb('0xf')]=function(_0x3d6657,_0x41bcb7){const _0x5d89d1=_0x4613bb,_0x2095bf=this;this[_0x5d89d1('0x8')][_0x5d89d1('0xd')](function(){const _0x3f2614=_0x5d89d1;return _0x2095bf[_0x3f2614('0x0')]['removeColumn'](_0x3d6657,_0x41bcb7)['then'](function(){const _0x5ea363=_0x3f2614;logger[_0x5ea363('0x7')](_0x5ea363('0x1a'),_0x41bcb7,_0x3d6657);})['catch'](function(_0x518eef){const _0x247173=_0x3f2614;logger[_0x247173('0x7')](util[_0x247173('0x3')](_0x518eef,{'showHidden':![],'depth':null}));});});},Migration[_0x4613bb('0x12')][_0x4613bb('0xe')]=function(_0x57302d,_0x301ba5,_0x1d286c){const _0x16dff2=_0x4613bb,_0x3d38bb=this;this['sequence'][_0x16dff2('0xd')](function(){const _0x1cdcfe=_0x16dff2;return _0x3d38bb[_0x1cdcfe('0x0')]['renameColumn'](_0x57302d,_0x301ba5,_0x1d286c)[_0x1cdcfe('0x10')](function(){const _0x5482ad=_0x1cdcfe;logger['info'](_0x5482ad('0xa'),_0x301ba5,_0x1d286c,_0x57302d);})['catch'](function(_0x165679){const _0x2125a4=_0x1cdcfe;logger[_0x2125a4('0x7')](util[_0x2125a4('0x3')](_0x165679,{'showHidden':![],'depth':null}));});});},Migration[_0x4613bb('0x12')][_0x4613bb('0x19')]=function(_0x3dc60f){const _0xe8e66a=_0x4613bb;this['sequence'][_0xe8e66a('0xd')](function(){return _0x3dc60f();});},module[_0x4613bb('0xb')]={'up':function(_0x3b6a91){return new Promise(function(_0x167dd1){const _0x183af5=new Migration(_0x3b6a91);_0x183af5['final'](_0x167dd1);});},'down':function(){}};