Built motion from commit 82a371561bcdbc7605c801e5e414f4032ba9e7ad. Version 3.0.0...
[motion-next.git] / server / migrations / 2.5.4.js
1 const a1017_0x14a2=['Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','query','query\x20%s','renameColumn','table\x20dropped\x20%s','queryInterface','addColumn','dropTable','indexName','changeColumn','sequence','Changed\x20column\x20%s\x20in\x20table\x20%s','exports','addIndex','info','tail','indicesType','removeIndex','final','then','catch','removeIndex\x20%s\x20%s','Removed\x20column\x20%s\x20from\x20%s','enqueue','Added\x20column\x20%s\x20to\x20%s','prototype','addIndex\x20%s\x20%s\x20%s\x20[%s]','migration','inspect','stringify'];(function(_0x4086c8,_0x14a283){const _0x41788e=function(_0x1bc913){while(--_0x1bc913){_0x4086c8['push'](_0x4086c8['shift']());}};_0x41788e(++_0x14a283);}(a1017_0x14a2,0x1b6));const a1017_0x4178=function(_0x4086c8,_0x14a283){_0x4086c8=_0x4086c8-0x0;let _0x41788e=a1017_0x14a2[_0x4086c8];return _0x41788e;};const _0x5491d5=a1017_0x4178;'use strict';const util=require('util'),logger=require('../config/logger')(_0x5491d5('0x9')),Sequence=function(){};Sequence[_0x5491d5('0x7')][_0x5491d5('0x5')]=function(_0x1bc913){const _0x5cf28b=_0x5491d5;this[_0x5cf28b('0x1b')]=this[_0x5cf28b('0x1b')]?this[_0x5cf28b('0x1b')]['finally'](_0x1bc913):_0x1bc913();};const Migration=function(_0x3db44d){const _0x2b1a69=_0x5491d5;this[_0x2b1a69('0x11')]=_0x3db44d,this[_0x2b1a69('0x16')]=new Sequence();};Migration[_0x5491d5('0x7')][_0x5491d5('0x15')]=function(_0x1b8755,_0x4efe4f,_0x3e51bd){const _0x575220=_0x5491d5,_0x34902e=this;this[_0x575220('0x16')][_0x575220('0x5')](function(){const _0x5e66fa=_0x575220;return _0x34902e[_0x5e66fa('0x11')][_0x5e66fa('0x15')](_0x1b8755,_0x4efe4f,_0x3e51bd)[_0x5e66fa('0x1')](function(){const _0x3e72bd=_0x5e66fa;logger[_0x3e72bd('0x1a')](_0x3e72bd('0x17'),_0x4efe4f,_0x1b8755);})[_0x5e66fa('0x2')](function(_0x284a43){const _0x385a40=_0x5e66fa;logger[_0x385a40('0x1a')](JSON[_0x385a40('0xb')](_0x284a43));});});},Migration[_0x5491d5('0x7')][_0x5491d5('0x12')]=function(_0x433190,_0x9e2306,_0x4f1ee6){const _0x108724=this;this['sequence']['enqueue'](function(){const _0x4308be=a1017_0x4178;return _0x108724['queryInterface']['addColumn'](_0x433190,_0x9e2306,_0x4f1ee6)['then'](function(){const _0x4c2ba2=a1017_0x4178;logger['info'](_0x4c2ba2('0x6'),_0x9e2306,_0x433190);})[_0x4308be('0x2')](function(_0x348bf8){const _0x54251a=_0x4308be;logger[_0x54251a('0x1a')](JSON['stringify'](_0x348bf8));});});},Migration[_0x5491d5('0x7')][_0x5491d5('0x13')]=function(_0x34b3dc){const _0x17fac8=_0x5491d5,_0x1fcbcc=this;this[_0x17fac8('0x16')][_0x17fac8('0x5')](function(){const _0x540bab=_0x17fac8;return _0x1fcbcc[_0x540bab('0x11')]['dropTable'](_0x34b3dc,{'force':!![]})[_0x540bab('0x1')](function(){const _0x58ec7e=_0x540bab;logger[_0x58ec7e('0x1a')](_0x58ec7e('0x10'),_0x34b3dc);})[_0x540bab('0x2')](function(_0x3e39d6){const _0x4b8215=_0x540bab;logger[_0x4b8215('0x1a')](JSON['stringify'](_0x3e39d6));});});},Migration['prototype'][_0x5491d5('0x19')]=function(_0x10b54c,_0x3ed54e,_0x333ee6){const _0x4c1009=_0x5491d5,_0x364ad6=this;this[_0x4c1009('0x16')]['enqueue'](function(){const _0x39267a=_0x4c1009;return _0x364ad6[_0x39267a('0x11')][_0x39267a('0x19')](_0x10b54c,_0x3ed54e,{'indexName':_0x333ee6['indexName'],'indicesType':_0x333ee6[_0x39267a('0x1c')]})['then'](function(){const _0x38cd4b=_0x39267a;logger['info'](_0x38cd4b('0x8'),_0x10b54c,_0x3ed54e['join'](','),_0x333ee6[_0x38cd4b('0x14')],_0x333ee6[_0x38cd4b('0x1c')]);})['catch'](function(_0x3a140b){const _0x11027f=_0x39267a;logger[_0x11027f('0x1a')](JSON[_0x11027f('0xb')](_0x3a140b));});});},Migration[_0x5491d5('0x7')][_0x5491d5('0x1d')]=function(_0x12f8f5,_0x3aa2f1){const _0xec3793=_0x5491d5,_0x819ae=this;this['sequence'][_0xec3793('0x5')](function(){const _0x28f793=_0xec3793;return _0x819ae[_0x28f793('0x11')][_0x28f793('0x1d')](_0x12f8f5,_0x3aa2f1)[_0x28f793('0x1')](function(){const _0x56b85b=_0x28f793;logger[_0x56b85b('0x1a')](_0x56b85b('0x3'),_0x12f8f5,_0x3aa2f1);})['catch'](function(_0x50726c){const _0x24e9df=_0x28f793;logger[_0x24e9df('0x1a')](JSON[_0x24e9df('0xb')](_0x50726c));});});},Migration[_0x5491d5('0x7')]['query']=function(_0x393ac7){const _0x599d05=_0x5491d5,_0x542e66=this;this[_0x599d05('0x16')][_0x599d05('0x5')](function(){const _0x36e9b1=_0x599d05;return _0x542e66[_0x36e9b1('0x11')]['sequelize'][_0x36e9b1('0xd')](_0x393ac7)[_0x36e9b1('0x1')](function(){const _0x1c3c5f=_0x36e9b1;logger[_0x1c3c5f('0x1a')](_0x1c3c5f('0xe'),_0x393ac7);})[_0x36e9b1('0x2')](function(_0x3a7a6b){const _0x34b22f=_0x36e9b1;logger['info'](JSON[_0x34b22f('0xb')](_0x3a7a6b));});});},Migration[_0x5491d5('0x7')]['removeColumn']=function(_0x39074b,_0x589bb9){const _0x5412e5=_0x5491d5,_0x1b699b=this;this[_0x5412e5('0x16')][_0x5412e5('0x5')](function(){const _0x5a33b8=_0x5412e5;return _0x1b699b[_0x5a33b8('0x11')]['removeColumn'](_0x39074b,_0x589bb9)[_0x5a33b8('0x1')](function(){const _0x372202=_0x5a33b8;logger['info'](_0x372202('0x4'),_0x589bb9,_0x39074b);})[_0x5a33b8('0x2')](function(_0x3e1cee){const _0x27cfea=_0x5a33b8;logger[_0x27cfea('0x1a')](util[_0x27cfea('0xa')](_0x3e1cee,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x5491d5('0xf')]=function(_0x232627,_0x127492,_0x1c4cbe){const _0x32670e=_0x5491d5,_0x590195=this;this[_0x32670e('0x16')]['enqueue'](function(){const _0x245515=_0x32670e;return _0x590195[_0x245515('0x11')][_0x245515('0xf')](_0x232627,_0x127492,_0x1c4cbe)[_0x245515('0x1')](function(){const _0x4cdf1c=_0x245515;logger[_0x4cdf1c('0x1a')](_0x4cdf1c('0xc'),_0x127492,_0x1c4cbe,_0x232627);})[_0x245515('0x2')](function(_0x11dff7){const _0x19e4af=_0x245515;logger['info'](util[_0x19e4af('0xa')](_0x11dff7,{'showHidden':![],'depth':null}));});});},Migration[_0x5491d5('0x7')]['final']=function(_0x11bdfe){const _0xadaff1=_0x5491d5;this[_0xadaff1('0x16')][_0xadaff1('0x5')](function(){return _0x11bdfe();});},module[_0x5491d5('0x18')]={'up':function(_0x392e40){return new Promise(function(_0x294ef2){const _0x3e184f=a1017_0x4178,_0x470585=new Migration(_0x392e40);_0x470585[_0x3e184f('0x0')](_0x294ef2);});},'down':function(){}};