cf6932a1c003e7ab3a4ebcf8f74f20582ce99d55
[motion-next.git] / server / migrations / 2.3.9.js
1 const a982_0x21b0=['sequence','query\x20%s','then','table\x20dropped\x20%s','info','removeColumn','inspect','join','addIndex','util','queryInterface','renameColumn','removeIndex\x20%s\x20%s','sequelize','Changed\x20column\x20%s\x20in\x20table\x20%s','Removed\x20column\x20%s\x20from\x20%s','addColumn','exports','../config/logger','stringify','indicesType','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','query','finally','migration','addIndex\x20%s\x20%s\x20%s\x20[%s]','changeColumn','final','catch','enqueue','dropTable','prototype','tail','Added\x20column\x20%s\x20to\x20%s','indexName'];(function(_0x503447,_0x21b06e){const _0x44ca59=function(_0x2a9808){while(--_0x2a9808){_0x503447['push'](_0x503447['shift']());}};_0x44ca59(++_0x21b06e);}(a982_0x21b0,0xaf));const a982_0x44ca=function(_0x503447,_0x21b06e){_0x503447=_0x503447-0x0;let _0x44ca59=a982_0x21b0[_0x503447];return _0x44ca59;};const _0x4fd856=a982_0x44ca;'use strict';const util=require(_0x4fd856('0x9')),logger=require(_0x4fd856('0x12'))(_0x4fd856('0x18')),Sequence=function(){};Sequence[_0x4fd856('0x1f')][_0x4fd856('0x1d')]=function(_0x2a9808){const _0x2760e3=_0x4fd856;this[_0x2760e3('0x20')]=this[_0x2760e3('0x20')]?this[_0x2760e3('0x20')][_0x2760e3('0x17')](_0x2a9808):_0x2a9808();};const Migration=function(_0x431d96){const _0x5d4ec5=_0x4fd856;this[_0x5d4ec5('0xa')]=_0x431d96,this[_0x5d4ec5('0x0')]=new Sequence();};Migration['prototype']['changeColumn']=function(_0x410a4f,_0x39a405,_0x358af2){const _0x153257=_0x4fd856,_0x3f3b28=this;this[_0x153257('0x0')]['enqueue'](function(){const _0x5ddce9=_0x153257;return _0x3f3b28[_0x5ddce9('0xa')][_0x5ddce9('0x1a')](_0x410a4f,_0x39a405,_0x358af2)[_0x5ddce9('0x2')](function(){const _0x58eda3=_0x5ddce9;logger[_0x58eda3('0x4')](_0x58eda3('0xe'),_0x39a405,_0x410a4f);})[_0x5ddce9('0x1c')](function(_0x1a37bd){const _0x42d597=_0x5ddce9;logger['info'](JSON[_0x42d597('0x13')](_0x1a37bd));});});},Migration['prototype']['addColumn']=function(_0xe41834,_0x459997,_0x222ed5){const _0x32f467=_0x4fd856,_0xf86aed=this;this[_0x32f467('0x0')]['enqueue'](function(){const _0x11c5b8=_0x32f467;return _0xf86aed[_0x11c5b8('0xa')][_0x11c5b8('0x10')](_0xe41834,_0x459997,_0x222ed5)[_0x11c5b8('0x2')](function(){const _0x253264=_0x11c5b8;logger[_0x253264('0x4')](_0x253264('0x21'),_0x459997,_0xe41834);})[_0x11c5b8('0x1c')](function(_0x19bf4f){const _0x9f2abc=_0x11c5b8;logger[_0x9f2abc('0x4')](JSON[_0x9f2abc('0x13')](_0x19bf4f));});});},Migration[_0x4fd856('0x1f')]['dropTable']=function(_0x415654){const _0x402ccb=_0x4fd856,_0x5186b1=this;this['sequence'][_0x402ccb('0x1d')](function(){const _0x8cd724=_0x402ccb;return _0x5186b1[_0x8cd724('0xa')][_0x8cd724('0x1e')](_0x415654,{'force':!![]})['then'](function(){const _0x5dfc1d=_0x8cd724;logger['info'](_0x5dfc1d('0x3'),_0x415654);})[_0x8cd724('0x1c')](function(_0x355e4f){const _0x5085aa=_0x8cd724;logger[_0x5085aa('0x4')](JSON[_0x5085aa('0x13')](_0x355e4f));});});},Migration[_0x4fd856('0x1f')]['addIndex']=function(_0x225fc8,_0x415f06,_0x36885e){const _0x242a3a=_0x4fd856,_0x42d003=this;this[_0x242a3a('0x0')][_0x242a3a('0x1d')](function(){const _0x2ac88b=_0x242a3a;return _0x42d003[_0x2ac88b('0xa')][_0x2ac88b('0x8')](_0x225fc8,_0x415f06,{'indexName':_0x36885e['indexName'],'indicesType':_0x36885e[_0x2ac88b('0x14')]})[_0x2ac88b('0x2')](function(){const _0x212147=_0x2ac88b;logger['info'](_0x212147('0x19'),_0x225fc8,_0x415f06[_0x212147('0x7')](','),_0x36885e[_0x212147('0x22')],_0x36885e[_0x212147('0x14')]);})['catch'](function(_0x51b9b0){const _0x3933dd=_0x2ac88b;logger[_0x3933dd('0x4')](JSON['stringify'](_0x51b9b0));});});},Migration[_0x4fd856('0x1f')]['removeIndex']=function(_0xfbfdd7,_0x5b69dc){const _0x1d17f6=this;this['sequence']['enqueue'](function(){const _0x38025c=a982_0x44ca;return _0x1d17f6[_0x38025c('0xa')]['removeIndex'](_0xfbfdd7,_0x5b69dc)[_0x38025c('0x2')](function(){const _0x405f20=_0x38025c;logger[_0x405f20('0x4')](_0x405f20('0xc'),_0xfbfdd7,_0x5b69dc);})['catch'](function(_0x7e696){const _0x2a9427=_0x38025c;logger[_0x2a9427('0x4')](JSON[_0x2a9427('0x13')](_0x7e696));});});},Migration['prototype'][_0x4fd856('0x16')]=function(_0x20a982){const _0x41c7e3=_0x4fd856,_0x7a4c57=this;this['sequence'][_0x41c7e3('0x1d')](function(){const _0x66e8ce=_0x41c7e3;return _0x7a4c57['queryInterface'][_0x66e8ce('0xd')][_0x66e8ce('0x16')](_0x20a982)[_0x66e8ce('0x2')](function(){const _0x360e78=_0x66e8ce;logger[_0x360e78('0x4')](_0x360e78('0x1'),_0x20a982);})[_0x66e8ce('0x1c')](function(_0x311f7b){const _0x2eb207=_0x66e8ce;logger[_0x2eb207('0x4')](JSON['stringify'](_0x311f7b));});});},Migration[_0x4fd856('0x1f')][_0x4fd856('0x5')]=function(_0x2d99fe,_0x241753){const _0x51e8b5=_0x4fd856,_0x2a83b0=this;this[_0x51e8b5('0x0')][_0x51e8b5('0x1d')](function(){const _0x58ffdd=_0x51e8b5;return _0x2a83b0[_0x58ffdd('0xa')]['removeColumn'](_0x2d99fe,_0x241753)[_0x58ffdd('0x2')](function(){const _0x51af9a=_0x58ffdd;logger[_0x51af9a('0x4')](_0x51af9a('0xf'),_0x241753,_0x2d99fe);})[_0x58ffdd('0x1c')](function(_0x4a0a63){const _0x14f8db=_0x58ffdd;logger[_0x14f8db('0x4')](util[_0x14f8db('0x6')](_0x4a0a63,{'showHidden':![],'depth':null}));});});},Migration[_0x4fd856('0x1f')][_0x4fd856('0xb')]=function(_0x44e9b4,_0x3f69bb,_0x2b97db){const _0x81a4ea=_0x4fd856,_0x2e2a96=this;this[_0x81a4ea('0x0')][_0x81a4ea('0x1d')](function(){const _0x29afd3=_0x81a4ea;return _0x2e2a96[_0x29afd3('0xa')][_0x29afd3('0xb')](_0x44e9b4,_0x3f69bb,_0x2b97db)[_0x29afd3('0x2')](function(){const _0x489fbc=_0x29afd3;logger[_0x489fbc('0x4')](_0x489fbc('0x15'),_0x3f69bb,_0x2b97db,_0x44e9b4);})['catch'](function(_0x434543){const _0x6de258=_0x29afd3;logger[_0x6de258('0x4')](util[_0x6de258('0x6')](_0x434543,{'showHidden':![],'depth':null}));});});},Migration[_0x4fd856('0x1f')][_0x4fd856('0x1b')]=function(_0x40590f){const _0x2f4e8c=_0x4fd856;this['sequence'][_0x2f4e8c('0x1d')](function(){return _0x40590f();});},module[_0x4fd856('0x11')]={'up':function(_0x3cc8e2){return new Promise(function(_0x56a1df){const _0x1b7636=a982_0x44ca,_0x16790d=new Migration(_0x3cc8e2);_0x16790d[_0x1b7636('0x1b')](_0x56a1df);});},'down':function(){}};