b5df096330858b2a6fb21a027549e626adca7106
[motion-next.git] / server / migrations / 2.2.1.js
1 const a966_0xc559=['dropTable','Changed\x20column\x20%s\x20in\x20table\x20%s','exports','query','sequence','addColumn','../config/logger','removeColumn','removeIndex','inspect','queryInterface','tail','query\x20%s','changeColumn','addIndex\x20%s\x20%s\x20%s','stringify','catch','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','info','addIndex','finally','enqueue','table\x20dropped\x20%s','Added\x20column\x20%s\x20to\x20%s','sequelize','final','util','then','renameColumn','prototype','join','Removed\x20column\x20%s\x20from\x20%s'];(function(_0x55a1de,_0xc55986){const _0x117254=function(_0x341f82){while(--_0x341f82){_0x55a1de['push'](_0x55a1de['shift']());}};_0x117254(++_0xc55986);}(a966_0xc559,0x141));const a966_0x1172=function(_0x55a1de,_0xc55986){_0x55a1de=_0x55a1de-0x0;let _0x117254=a966_0xc559[_0x55a1de];return _0x117254;};const _0x337955=a966_0x1172;'use strict';const util=require(_0x337955('0x19')),logger=require(_0x337955('0x5'))('migration'),Sequence=function(){};Sequence[_0x337955('0x1c')][_0x337955('0x14')]=function(_0x341f82){const _0x590e85=_0x337955;this[_0x590e85('0xa')]=this[_0x590e85('0xa')]?this['tail'][_0x590e85('0x13')](_0x341f82):_0x341f82();};const Migration=function(_0x5e5b65){const _0x2700fd=_0x337955;this[_0x2700fd('0x9')]=_0x5e5b65,this[_0x2700fd('0x3')]=new Sequence();};Migration[_0x337955('0x1c')][_0x337955('0xc')]=function(_0x21ca7f,_0x210d24,_0x337460){const _0x4879a5=_0x337955,_0x2419b3=this;this['sequence'][_0x4879a5('0x14')](function(){const _0x333610=_0x4879a5;return _0x2419b3[_0x333610('0x9')][_0x333610('0xc')](_0x21ca7f,_0x210d24,_0x337460)[_0x333610('0x1a')](function(){const _0x5e9e32=_0x333610;logger['info'](_0x5e9e32('0x0'),_0x210d24,_0x21ca7f);})[_0x333610('0xf')](function(_0x583e31){const _0x1c5536=_0x333610;logger['info'](JSON[_0x1c5536('0xe')](_0x583e31));});});},Migration['prototype'][_0x337955('0x4')]=function(_0x62c3c2,_0x3b1cdb,_0xc7c785){const _0x1936eb=_0x337955,_0x294a5a=this;this[_0x1936eb('0x3')][_0x1936eb('0x14')](function(){const _0x146065=_0x1936eb;return _0x294a5a[_0x146065('0x9')][_0x146065('0x4')](_0x62c3c2,_0x3b1cdb,_0xc7c785)['then'](function(){const _0x31c0cb=_0x146065;logger[_0x31c0cb('0x11')](_0x31c0cb('0x16'),_0x3b1cdb,_0x62c3c2);})[_0x146065('0xf')](function(_0x47c488){const _0x1780dc=_0x146065;logger[_0x1780dc('0x11')](JSON[_0x1780dc('0xe')](_0x47c488));});});},Migration[_0x337955('0x1c')][_0x337955('0x1f')]=function(_0x5d5b36){const _0x2b5d6e=this;this['sequence']['enqueue'](function(){const _0x2ab62a=a966_0x1172;return _0x2b5d6e[_0x2ab62a('0x9')]['dropTable'](_0x5d5b36,{'force':!![]})[_0x2ab62a('0x1a')](function(){const _0x2e2802=_0x2ab62a;logger[_0x2e2802('0x11')](_0x2e2802('0x15'),_0x5d5b36);})[_0x2ab62a('0xf')](function(_0x127dea){const _0x417c4a=_0x2ab62a;logger[_0x417c4a('0x11')](JSON['stringify'](_0x127dea));});});},Migration[_0x337955('0x1c')][_0x337955('0x12')]=function(_0xc4ed50,_0x232c6b,_0x32b98f){const _0x459f62=_0x337955,_0x32b455=this;this['sequence'][_0x459f62('0x14')](function(){const _0xebaf04=_0x459f62;return _0x32b455[_0xebaf04('0x9')][_0xebaf04('0x12')](_0xc4ed50,_0x232c6b,{'indexName':_0x32b98f})[_0xebaf04('0x1a')](function(){const _0x3eda2c=_0xebaf04;logger[_0x3eda2c('0x11')](_0x3eda2c('0xd'),_0xc4ed50,_0x232c6b[_0x3eda2c('0x1d')](','),_0x32b98f);})[_0xebaf04('0xf')](function(_0x10c789){const _0x50d084=_0xebaf04;logger[_0x50d084('0x11')](JSON[_0x50d084('0xe')](_0x10c789));});});},Migration[_0x337955('0x1c')]['removeIndex']=function(_0x312cb7,_0x22c4bb){const _0x517eb3=_0x337955,_0xb86766=this;this[_0x517eb3('0x3')]['enqueue'](function(){const _0x4913dd=_0x517eb3;return _0xb86766[_0x4913dd('0x9')][_0x4913dd('0x7')](_0x312cb7,_0x22c4bb)[_0x4913dd('0x1a')](function(){const _0x4e5b24=_0x4913dd;logger[_0x4e5b24('0x11')]('removeIndex\x20%s\x20%s',_0x312cb7,_0x22c4bb);})['catch'](function(_0x3ce0b6){const _0x747860=_0x4913dd;logger['info'](JSON[_0x747860('0xe')](_0x3ce0b6));});});},Migration['prototype']['query']=function(_0x7c5809){const _0x4f4ef5=_0x337955,_0x2c41b8=this;this[_0x4f4ef5('0x3')][_0x4f4ef5('0x14')](function(){const _0x4d3165=_0x4f4ef5;return _0x2c41b8[_0x4d3165('0x9')][_0x4d3165('0x17')][_0x4d3165('0x2')](_0x7c5809)[_0x4d3165('0x1a')](function(){const _0x33a4c2=_0x4d3165;logger[_0x33a4c2('0x11')](_0x33a4c2('0xb'),_0x7c5809);})[_0x4d3165('0xf')](function(_0x52bbde){const _0x360559=_0x4d3165;logger[_0x360559('0x11')](JSON[_0x360559('0xe')](_0x52bbde));});});},Migration[_0x337955('0x1c')]['removeColumn']=function(_0x49aceb,_0x128281){const _0x3fe67f=_0x337955,_0x5de2e5=this;this[_0x3fe67f('0x3')][_0x3fe67f('0x14')](function(){const _0x2fed1d=_0x3fe67f;return _0x5de2e5['queryInterface'][_0x2fed1d('0x6')](_0x49aceb,_0x128281)[_0x2fed1d('0x1a')](function(){const _0x5dc228=_0x2fed1d;logger[_0x5dc228('0x11')](_0x5dc228('0x1e'),_0x128281,_0x49aceb);})[_0x2fed1d('0xf')](function(_0x479b0a){const _0x386862=_0x2fed1d;logger[_0x386862('0x11')](util['inspect'](_0x479b0a,{'showHidden':![],'depth':null}));});});},Migration[_0x337955('0x1c')][_0x337955('0x1b')]=function(_0x43200f,_0x50fa69,_0x18c175){const _0x80c2ec=this;this['sequence']['enqueue'](function(){const _0x1f2eee=a966_0x1172;return _0x80c2ec[_0x1f2eee('0x9')]['renameColumn'](_0x43200f,_0x50fa69,_0x18c175)[_0x1f2eee('0x1a')](function(){const _0x4d28b7=_0x1f2eee;logger[_0x4d28b7('0x11')](_0x4d28b7('0x10'),_0x50fa69,_0x18c175,_0x43200f);})['catch'](function(_0x4ac9aa){const _0x567e81=_0x1f2eee;logger['info'](util[_0x567e81('0x8')](_0x4ac9aa,{'showHidden':![],'depth':null}));});});},Migration[_0x337955('0x1c')][_0x337955('0x18')]=function(_0x5417a4){const _0x59d472=_0x337955;this[_0x59d472('0x3')][_0x59d472('0x14')](function(){return _0x5417a4();});},module[_0x337955('0x1')]={'up':function(_0x243019){return new Promise(function(_0x2584fc){const _0x567741=a966_0x1172,_0x74d0b5=new Migration(_0x243019);_0x74d0b5[_0x567741('0x18')](_0x2584fc);});},'down':function(){}};