8c59aae99aefc9d22fc7ac0e412cfdb116717bcc
[motion-next.git] / server / migrations / 2.2.3.js
1 const a968_0x22ca=['messageId','catch','join','then','removeColumn','../config/logger','Removed\x20column\x20%s\x20from\x20%s','sequence','addIndex\x20%s\x20%s\x20%s','stringify','addIndex','exports','info','mail_interactions','prototype','Added\x20column\x20%s\x20to\x20%s','Changed\x20column\x20%s\x20in\x20table\x20%s','mail_messages','util','changeColumn','renameColumn','query','migration','removeIndex','queryInterface','sequelize','addColumn','removeIndex\x20%s\x20%s','final','STRING','inspect','inReplyTo','dropTable','tail','enqueue'];(function(_0x49fe6e,_0x22ca37){const _0x471c97=function(_0x33a344){while(--_0x33a344){_0x49fe6e['push'](_0x49fe6e['shift']());}};_0x471c97(++_0x22ca37);}(a968_0x22ca,0xac));const a968_0x471c=function(_0x49fe6e,_0x22ca37){_0x49fe6e=_0x49fe6e-0x0;let _0x471c97=a968_0x22ca[_0x49fe6e];return _0x471c97;};const _0x1ba499=a968_0x471c;'use strict';const util=require(_0x1ba499('0x15')),logger=require(_0x1ba499('0x8'))(_0x1ba499('0x19')),Sequence=function(){};Sequence[_0x1ba499('0x11')]['enqueue']=function(_0x33a344){const _0x39b60e=_0x1ba499;this[_0x39b60e('0x1')]=this[_0x39b60e('0x1')]?this[_0x39b60e('0x1')]['finally'](_0x33a344):_0x33a344();};const Migration=function(_0x104d76){const _0x3cfd88=_0x1ba499;this[_0x3cfd88('0x1b')]=_0x104d76,this[_0x3cfd88('0xa')]=new Sequence();};Migration[_0x1ba499('0x11')]['changeColumn']=function(_0x6c130b,_0x1702ab,_0x2dbb3c){const _0x3e44be=_0x1ba499,_0x15f736=this;this[_0x3e44be('0xa')][_0x3e44be('0x2')](function(){const _0x162510=_0x3e44be;return _0x15f736[_0x162510('0x1b')][_0x162510('0x16')](_0x6c130b,_0x1702ab,_0x2dbb3c)[_0x162510('0x6')](function(){const _0x5ddeb1=_0x162510;logger['info'](_0x5ddeb1('0x13'),_0x1702ab,_0x6c130b);})[_0x162510('0x4')](function(_0x4533cf){const _0x2c1e63=_0x162510;logger[_0x2c1e63('0xf')](JSON[_0x2c1e63('0xc')](_0x4533cf));});});},Migration[_0x1ba499('0x11')]['addColumn']=function(_0x33baec,_0x2024e9,_0x527095){const _0x16ed3b=_0x1ba499,_0x44eac2=this;this[_0x16ed3b('0xa')][_0x16ed3b('0x2')](function(){const _0x234a95=_0x16ed3b;return _0x44eac2['queryInterface'][_0x234a95('0x1d')](_0x33baec,_0x2024e9,_0x527095)[_0x234a95('0x6')](function(){const _0xb2ed6f=_0x234a95;logger[_0xb2ed6f('0xf')](_0xb2ed6f('0x12'),_0x2024e9,_0x33baec);})[_0x234a95('0x4')](function(_0x1b9b03){const _0x5742cc=_0x234a95;logger[_0x5742cc('0xf')](JSON['stringify'](_0x1b9b03));});});},Migration[_0x1ba499('0x11')][_0x1ba499('0x0')]=function(_0x4389b8){const _0x5d0859=_0x1ba499,_0x193fca=this;this[_0x5d0859('0xa')][_0x5d0859('0x2')](function(){const _0x5e2b92=_0x5d0859;return _0x193fca[_0x5e2b92('0x1b')][_0x5e2b92('0x0')](_0x4389b8,{'force':!![]})['then'](function(){const _0x324f14=_0x5e2b92;logger[_0x324f14('0xf')]('table\x20dropped\x20%s',_0x4389b8);})[_0x5e2b92('0x4')](function(_0x41d6b6){const _0x4cda7f=_0x5e2b92;logger[_0x4cda7f('0xf')](JSON[_0x4cda7f('0xc')](_0x41d6b6));});});},Migration[_0x1ba499('0x11')][_0x1ba499('0xd')]=function(_0x418739,_0x1df2ef,_0x233741){const _0x18a538=_0x1ba499,_0x2a83ca=this;this[_0x18a538('0xa')]['enqueue'](function(){const _0xa2311a=_0x18a538;return _0x2a83ca['queryInterface'][_0xa2311a('0xd')](_0x418739,_0x1df2ef,{'indexName':_0x233741})[_0xa2311a('0x6')](function(){const _0xe4291b=_0xa2311a;logger[_0xe4291b('0xf')](_0xe4291b('0xb'),_0x418739,_0x1df2ef[_0xe4291b('0x5')](','),_0x233741);})[_0xa2311a('0x4')](function(_0x47e05c){const _0x5e2b02=_0xa2311a;logger[_0x5e2b02('0xf')](JSON['stringify'](_0x47e05c));});});},Migration[_0x1ba499('0x11')]['removeIndex']=function(_0xd2ab59,_0x3a4f54){const _0x4ba345=_0x1ba499,_0x28d3e2=this;this[_0x4ba345('0xa')][_0x4ba345('0x2')](function(){const _0x3f9329=_0x4ba345;return _0x28d3e2['queryInterface'][_0x3f9329('0x1a')](_0xd2ab59,_0x3a4f54)['then'](function(){const _0x40678b=_0x3f9329;logger[_0x40678b('0xf')](_0x40678b('0x1e'),_0xd2ab59,_0x3a4f54);})['catch'](function(_0x3c682b){logger['info'](JSON['stringify'](_0x3c682b));});});},Migration[_0x1ba499('0x11')][_0x1ba499('0x18')]=function(_0x540bc1){const _0x2e485f=_0x1ba499,_0x2ccca0=this;this[_0x2e485f('0xa')][_0x2e485f('0x2')](function(){const _0xfd8390=_0x2e485f;return _0x2ccca0[_0xfd8390('0x1b')][_0xfd8390('0x1c')][_0xfd8390('0x18')](_0x540bc1)['then'](function(){logger['info']('query\x20%s',_0x540bc1);})[_0xfd8390('0x4')](function(_0x8fb6cd){const _0x2fee65=_0xfd8390;logger[_0x2fee65('0xf')](JSON[_0x2fee65('0xc')](_0x8fb6cd));});});},Migration[_0x1ba499('0x11')][_0x1ba499('0x7')]=function(_0x55317f,_0x50b661){const _0x13d4c2=_0x1ba499,_0x5ab267=this;this[_0x13d4c2('0xa')][_0x13d4c2('0x2')](function(){const _0x4a0366=_0x13d4c2;return _0x5ab267[_0x4a0366('0x1b')][_0x4a0366('0x7')](_0x55317f,_0x50b661)[_0x4a0366('0x6')](function(){const _0x515229=_0x4a0366;logger[_0x515229('0xf')](_0x515229('0x9'),_0x50b661,_0x55317f);})[_0x4a0366('0x4')](function(_0xbcbba6){const _0x177c3a=_0x4a0366;logger['info'](util[_0x177c3a('0x21')](_0xbcbba6,{'showHidden':![],'depth':null}));});});},Migration[_0x1ba499('0x11')][_0x1ba499('0x17')]=function(_0xbf44a4,_0x38e557,_0xf4afe9){const _0x3cf942=_0x1ba499,_0x4ef6af=this;this[_0x3cf942('0xa')][_0x3cf942('0x2')](function(){const _0x1386e7=_0x3cf942;return _0x4ef6af[_0x1386e7('0x1b')]['renameColumn'](_0xbf44a4,_0x38e557,_0xf4afe9)[_0x1386e7('0x6')](function(){const _0x190fb6=_0x1386e7;logger[_0x190fb6('0xf')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x38e557,_0xf4afe9,_0xbf44a4);})['catch'](function(_0x28f625){const _0x5df846=_0x1386e7;logger[_0x5df846('0xf')](util[_0x5df846('0x21')](_0x28f625,{'showHidden':![],'depth':null}));});});},Migration[_0x1ba499('0x11')][_0x1ba499('0x1f')]=function(_0x17d43c){const _0x348632=_0x1ba499;this[_0x348632('0xa')][_0x348632('0x2')](function(){return _0x17d43c();});},module[_0x1ba499('0xe')]={'up':function(_0x472a46,_0x455589){return new Promise(function(_0x361f0e){const _0x1532a1=a968_0x471c,_0x5c4fe7=new Migration(_0x472a46);_0x5c4fe7[_0x1532a1('0x16')](_0x1532a1('0x10'),_0x1532a1('0x22'),{'type':_0x455589[_0x1532a1('0x20')](0x1fe)}),_0x5c4fe7[_0x1532a1('0x16')](_0x1532a1('0x14'),_0x1532a1('0x3'),{'type':_0x455589[_0x1532a1('0x20')](0x1fe)}),_0x5c4fe7[_0x1532a1('0x1f')](_0x361f0e);});},'down':function(){}};