Built motion from commit f651e4b0a7312c0adceb5e57d6684a801a3aaf0d. Version 3.0.0...
[motion-next.git] / server / migrations / 2.3.1.js
1 const a973_0xc6dd=['util','addIndex\x20%s\x20%s\x20%s','exports','removeColumn','query','dropTable','addColumn','sequelize','inspect','removeIndex','removeIndex\x20%s\x20%s','changeColumn','renameColumn','sequence','finally','then','table\x20dropped\x20%s','tail','queryInterface','final','enqueue','stringify','prototype','info','addIndex','catch'];(function(_0x35f5c1,_0xc6dddc){const _0x26b052=function(_0x24afa5){while(--_0x24afa5){_0x35f5c1['push'](_0x35f5c1['shift']());}};_0x26b052(++_0xc6dddc);}(a973_0xc6dd,0x1c1));const a973_0x26b0=function(_0x35f5c1,_0xc6dddc){_0x35f5c1=_0x35f5c1-0x0;let _0x26b052=a973_0xc6dd[_0x35f5c1];return _0x26b052;};const _0x4f47e5=a973_0x26b0;'use strict';const util=require(_0x4f47e5('0x13')),logger=require('../config/logger')('migration'),Sequence=function(){};Sequence[_0x4f47e5('0xf')][_0x4f47e5('0xd')]=function(_0x24afa5){const _0x18ca9f=_0x4f47e5;this[_0x18ca9f('0xa')]=this[_0x18ca9f('0xa')]?this[_0x18ca9f('0xa')][_0x18ca9f('0x7')](_0x24afa5):_0x24afa5();};const Migration=function(_0x127f33){const _0x407f92=_0x4f47e5;this[_0x407f92('0xb')]=_0x127f33,this['sequence']=new Sequence();};Migration[_0x4f47e5('0xf')][_0x4f47e5('0x4')]=function(_0x438363,_0x380431,_0x1ec29e){const _0x3ae857=_0x4f47e5,_0x8feb3d=this;this[_0x3ae857('0x6')][_0x3ae857('0xd')](function(){const _0x2899f1=_0x3ae857;return _0x8feb3d[_0x2899f1('0xb')][_0x2899f1('0x4')](_0x438363,_0x380431,_0x1ec29e)['then'](function(){const _0x42b1d5=_0x2899f1;logger[_0x42b1d5('0x10')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x380431,_0x438363);})[_0x2899f1('0x12')](function(_0x48e99a){logger['info'](JSON['stringify'](_0x48e99a));});});},Migration['prototype'][_0x4f47e5('0x19')]=function(_0x20d781,_0x803c7c,_0x44d70c){const _0x5d342f=_0x4f47e5,_0x3b7487=this;this[_0x5d342f('0x6')][_0x5d342f('0xd')](function(){const _0x307895=_0x5d342f;return _0x3b7487['queryInterface'][_0x307895('0x19')](_0x20d781,_0x803c7c,_0x44d70c)[_0x307895('0x8')](function(){const _0x39a928=_0x307895;logger[_0x39a928('0x10')]('Added\x20column\x20%s\x20to\x20%s',_0x803c7c,_0x20d781);})[_0x307895('0x12')](function(_0x4879f4){const _0x8431b0=_0x307895;logger[_0x8431b0('0x10')](JSON[_0x8431b0('0xe')](_0x4879f4));});});},Migration['prototype'][_0x4f47e5('0x18')]=function(_0x51270e){const _0xeed188=this;this['sequence']['enqueue'](function(){const _0x396862=a973_0x26b0;return _0xeed188[_0x396862('0xb')][_0x396862('0x18')](_0x51270e,{'force':!![]})[_0x396862('0x8')](function(){const _0x56bb8c=_0x396862;logger['info'](_0x56bb8c('0x9'),_0x51270e);})[_0x396862('0x12')](function(_0x5b95e9){const _0x289307=_0x396862;logger['info'](JSON[_0x289307('0xe')](_0x5b95e9));});});},Migration['prototype'][_0x4f47e5('0x11')]=function(_0x233d23,_0x4cdff3,_0x10fda0){const _0x557a03=_0x4f47e5,_0x9c7a89=this;this['sequence'][_0x557a03('0xd')](function(){const _0x295399=_0x557a03;return _0x9c7a89[_0x295399('0xb')][_0x295399('0x11')](_0x233d23,_0x4cdff3,{'indexName':_0x10fda0})[_0x295399('0x8')](function(){const _0x3f8b84=_0x295399;logger[_0x3f8b84('0x10')](_0x3f8b84('0x14'),_0x233d23,_0x4cdff3['join'](','),_0x10fda0);})['catch'](function(_0x2f867a){const _0x2e5203=_0x295399;logger[_0x2e5203('0x10')](JSON[_0x2e5203('0xe')](_0x2f867a));});});},Migration['prototype'][_0x4f47e5('0x2')]=function(_0x22667d,_0x579ca1){const _0x557719=_0x4f47e5,_0x1ec358=this;this['sequence'][_0x557719('0xd')](function(){const _0x25eaf5=_0x557719;return _0x1ec358[_0x25eaf5('0xb')][_0x25eaf5('0x2')](_0x22667d,_0x579ca1)[_0x25eaf5('0x8')](function(){const _0xe241dd=_0x25eaf5;logger[_0xe241dd('0x10')](_0xe241dd('0x3'),_0x22667d,_0x579ca1);})['catch'](function(_0x821756){const _0x569b2f=_0x25eaf5;logger[_0x569b2f('0x10')](JSON['stringify'](_0x821756));});});},Migration[_0x4f47e5('0xf')]['query']=function(_0x26c051){const _0x138bd3=_0x4f47e5,_0xd833ee=this;this[_0x138bd3('0x6')][_0x138bd3('0xd')](function(){const _0x35895a=_0x138bd3;return _0xd833ee[_0x35895a('0xb')][_0x35895a('0x0')][_0x35895a('0x17')](_0x26c051)[_0x35895a('0x8')](function(){logger['info']('query\x20%s',_0x26c051);})[_0x35895a('0x12')](function(_0x27f23e){const _0xf5c492=_0x35895a;logger[_0xf5c492('0x10')](JSON[_0xf5c492('0xe')](_0x27f23e));});});},Migration[_0x4f47e5('0xf')][_0x4f47e5('0x16')]=function(_0x2ecda7,_0x3e531a){const _0x20a9dc=_0x4f47e5,_0x31be26=this;this[_0x20a9dc('0x6')][_0x20a9dc('0xd')](function(){const _0x98f52b=_0x20a9dc;return _0x31be26['queryInterface'][_0x98f52b('0x16')](_0x2ecda7,_0x3e531a)[_0x98f52b('0x8')](function(){const _0x4650a9=_0x98f52b;logger[_0x4650a9('0x10')]('Removed\x20column\x20%s\x20from\x20%s',_0x3e531a,_0x2ecda7);})[_0x98f52b('0x12')](function(_0x42df3c){const _0x321729=_0x98f52b;logger[_0x321729('0x10')](util[_0x321729('0x1')](_0x42df3c,{'showHidden':![],'depth':null}));});});},Migration[_0x4f47e5('0xf')]['renameColumn']=function(_0x2e9a7d,_0x5b2c99,_0x582eb9){const _0xb4d316=_0x4f47e5,_0x2cf3ba=this;this[_0xb4d316('0x6')]['enqueue'](function(){const _0x3fc758=_0xb4d316;return _0x2cf3ba[_0x3fc758('0xb')][_0x3fc758('0x5')](_0x2e9a7d,_0x5b2c99,_0x582eb9)['then'](function(){const _0x16ae6f=_0x3fc758;logger[_0x16ae6f('0x10')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x5b2c99,_0x582eb9,_0x2e9a7d);})[_0x3fc758('0x12')](function(_0x3974df){const _0x544aff=_0x3fc758;logger[_0x544aff('0x10')](util['inspect'](_0x3974df,{'showHidden':![],'depth':null}));});});},Migration[_0x4f47e5('0xf')][_0x4f47e5('0xc')]=function(_0xa793d8){const _0x24fd9c=_0x4f47e5;this[_0x24fd9c('0x6')][_0x24fd9c('0xd')](function(){return _0xa793d8();});},module[_0x4f47e5('0x15')]={'up':function(_0x152c51){return new Promise(function(_0x224c55){const _0x472512=a973_0x26b0,_0x43530e=new Migration(_0x152c51);_0x43530e[_0x472512('0xc')](_0x224c55);});},'down':function(){}};