Built motion from commit c49361c37b5f784889c8087ac6e0e91b7e6b561a. Version 3.0.0...
[motion-next.git] / server / migrations / 2.4.5.js
1 const a1008_0x4786=['Added\x20column\x20%s\x20to\x20%s','addIndex','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','removeIndex','join','indexName','final','../config/logger','removeColumn','indicesType','query','then','table\x20dropped\x20%s','catch','queryInterface','changeColumn','enqueue','sequence','finally','sequelize','prototype','tail','info','inspect','addIndex\x20%s\x20%s\x20%s\x20[%s]','stringify','renameColumn','dropTable','addColumn','migration'];(function(_0x51edb5,_0x4786b0){const _0x104ebf=function(_0x582aed){while(--_0x582aed){_0x51edb5['push'](_0x51edb5['shift']());}};_0x104ebf(++_0x4786b0);}(a1008_0x4786,0xb7));const a1008_0x104e=function(_0x51edb5,_0x4786b0){_0x51edb5=_0x51edb5-0x0;let _0x104ebf=a1008_0x4786[_0x51edb5];return _0x104ebf;};const _0x3f92f1=a1008_0x104e;'use strict';const util=require('util'),logger=require(_0x3f92f1('0x4'))(_0x3f92f1('0x1a')),Sequence=function(){};Sequence[_0x3f92f1('0x11')]['enqueue']=function(_0x582aed){const _0xe10b14=_0x3f92f1;this[_0xe10b14('0x12')]=this['tail']?this[_0xe10b14('0x12')][_0xe10b14('0xf')](_0x582aed):_0x582aed();};const Migration=function(_0x197143){const _0x22091a=_0x3f92f1;this[_0x22091a('0xb')]=_0x197143,this[_0x22091a('0xe')]=new Sequence();};Migration['prototype']['changeColumn']=function(_0x135758,_0x535d05,_0x1cb0ea){const _0x202ffe=_0x3f92f1,_0x1c69ac=this;this['sequence'][_0x202ffe('0xd')](function(){const _0x5184d8=_0x202ffe;return _0x1c69ac[_0x5184d8('0xb')][_0x5184d8('0xc')](_0x135758,_0x535d05,_0x1cb0ea)[_0x5184d8('0x8')](function(){const _0x4afd51=_0x5184d8;logger[_0x4afd51('0x13')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x535d05,_0x135758);})[_0x5184d8('0xa')](function(_0x353d98){const _0x162bf7=_0x5184d8;logger[_0x162bf7('0x13')](JSON[_0x162bf7('0x16')](_0x353d98));});});},Migration[_0x3f92f1('0x11')][_0x3f92f1('0x19')]=function(_0x518d8e,_0x54121e,_0xf227c9){const _0x574248=_0x3f92f1,_0x25d33b=this;this[_0x574248('0xe')]['enqueue'](function(){const _0x41854f=_0x574248;return _0x25d33b[_0x41854f('0xb')][_0x41854f('0x19')](_0x518d8e,_0x54121e,_0xf227c9)[_0x41854f('0x8')](function(){const _0x131773=_0x41854f;logger[_0x131773('0x13')](_0x131773('0x1b'),_0x54121e,_0x518d8e);})[_0x41854f('0xa')](function(_0x4b934f){const _0x41c6cf=_0x41854f;logger[_0x41c6cf('0x13')](JSON[_0x41c6cf('0x16')](_0x4b934f));});});},Migration[_0x3f92f1('0x11')][_0x3f92f1('0x18')]=function(_0x178223){const _0x3a04fa=_0x3f92f1,_0x16b34c=this;this[_0x3a04fa('0xe')][_0x3a04fa('0xd')](function(){const _0x351fa0=_0x3a04fa;return _0x16b34c['queryInterface']['dropTable'](_0x178223,{'force':!![]})[_0x351fa0('0x8')](function(){const _0x1c01e5=_0x351fa0;logger['info'](_0x1c01e5('0x9'),_0x178223);})['catch'](function(_0x4b3732){const _0x110598=_0x351fa0;logger[_0x110598('0x13')](JSON[_0x110598('0x16')](_0x4b3732));});});},Migration[_0x3f92f1('0x11')][_0x3f92f1('0x1c')]=function(_0x4aa5e2,_0x13ef7c,_0x3c5208){const _0xe52d3c=this;this['sequence']['enqueue'](function(){const _0x1dd223=a1008_0x104e;return _0xe52d3c[_0x1dd223('0xb')][_0x1dd223('0x1c')](_0x4aa5e2,_0x13ef7c,{'indexName':_0x3c5208['indexName'],'indicesType':_0x3c5208[_0x1dd223('0x6')]})[_0x1dd223('0x8')](function(){const _0x1cdb6a=_0x1dd223;logger[_0x1cdb6a('0x13')](_0x1cdb6a('0x15'),_0x4aa5e2,_0x13ef7c[_0x1cdb6a('0x1')](','),_0x3c5208[_0x1cdb6a('0x2')],_0x3c5208[_0x1cdb6a('0x6')]);})[_0x1dd223('0xa')](function(_0x1c3f4b){const _0x1afc1e=_0x1dd223;logger[_0x1afc1e('0x13')](JSON[_0x1afc1e('0x16')](_0x1c3f4b));});});},Migration['prototype']['removeIndex']=function(_0x8423fe,_0x2708d1){const _0x144a2b=_0x3f92f1,_0x552fbb=this;this[_0x144a2b('0xe')][_0x144a2b('0xd')](function(){const _0x2cf3b4=_0x144a2b;return _0x552fbb[_0x2cf3b4('0xb')][_0x2cf3b4('0x0')](_0x8423fe,_0x2708d1)[_0x2cf3b4('0x8')](function(){const _0x595485=_0x2cf3b4;logger[_0x595485('0x13')]('removeIndex\x20%s\x20%s',_0x8423fe,_0x2708d1);})['catch'](function(_0x5f3cb6){const _0x25bf04=_0x2cf3b4;logger['info'](JSON[_0x25bf04('0x16')](_0x5f3cb6));});});},Migration[_0x3f92f1('0x11')][_0x3f92f1('0x7')]=function(_0x5d1ec4){const _0x239238=_0x3f92f1,_0x11bff9=this;this['sequence'][_0x239238('0xd')](function(){const _0x1a8990=_0x239238;return _0x11bff9[_0x1a8990('0xb')][_0x1a8990('0x10')][_0x1a8990('0x7')](_0x5d1ec4)['then'](function(){const _0x41a799=_0x1a8990;logger[_0x41a799('0x13')]('query\x20%s',_0x5d1ec4);})[_0x1a8990('0xa')](function(_0x16a55a){logger['info'](JSON['stringify'](_0x16a55a));});});},Migration[_0x3f92f1('0x11')]['removeColumn']=function(_0x46f916,_0x29ac00){const _0x212e27=_0x3f92f1,_0x5a0e3c=this;this[_0x212e27('0xe')]['enqueue'](function(){const _0x32248c=_0x212e27;return _0x5a0e3c['queryInterface'][_0x32248c('0x5')](_0x46f916,_0x29ac00)[_0x32248c('0x8')](function(){logger['info']('Removed\x20column\x20%s\x20from\x20%s',_0x29ac00,_0x46f916);})[_0x32248c('0xa')](function(_0x12079){const _0x209746=_0x32248c;logger[_0x209746('0x13')](util[_0x209746('0x14')](_0x12079,{'showHidden':![],'depth':null}));});});},Migration[_0x3f92f1('0x11')][_0x3f92f1('0x17')]=function(_0xfe02a5,_0xa7f596,_0x3db8be){const _0x3252c3=_0x3f92f1,_0x1693e0=this;this[_0x3252c3('0xe')][_0x3252c3('0xd')](function(){const _0x3238de=_0x3252c3;return _0x1693e0[_0x3238de('0xb')]['renameColumn'](_0xfe02a5,_0xa7f596,_0x3db8be)[_0x3238de('0x8')](function(){const _0xd18261=_0x3238de;logger[_0xd18261('0x13')](_0xd18261('0x1d'),_0xa7f596,_0x3db8be,_0xfe02a5);})[_0x3238de('0xa')](function(_0x54deba){const _0x230bce=_0x3238de;logger['info'](util[_0x230bce('0x14')](_0x54deba,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x3f92f1('0x3')]=function(_0x200a18){const _0x39795d=_0x3f92f1;this['sequence'][_0x39795d('0xd')](function(){return _0x200a18();});},module['exports']={'up':function(_0x466234){return new Promise(function(_0x5e3ffb){const _0x2c27a7=a1008_0x104e,_0x1392b6=new Migration(_0x466234);_0x1392b6[_0x2c27a7('0x3')](_0x5e3ffb);});},'down':function(){}};