Built motion from commit 8dca541896b0ff92bb88a36cc13f4f385b593b4b. Version 3.0.0...
[motion-next.git] / server / migrations / 2.3.5.js
1 const a978_0x3ff8=['stringify','Changed\x20column\x20%s\x20in\x20table\x20%s','indicesType','queryInterface','changeColumn','dropTable','sequelize','renameColumn','exports','removeColumn','info','tail','then','table\x20dropped\x20%s','query','removeIndex','addColumn','final','catch','finally','../config/logger','query\x20%s','addIndex\x20%s\x20%s\x20%s\x20[%s]','indexName','util','inspect','Removed\x20column\x20%s\x20from\x20%s','Added\x20column\x20%s\x20to\x20%s','prototype','sequence','enqueue','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','join','addIndex'];(function(_0x1ffc70,_0x3ff869){const _0x4a99d7=function(_0x434eed){while(--_0x434eed){_0x1ffc70['push'](_0x1ffc70['shift']());}};_0x4a99d7(++_0x3ff869);}(a978_0x3ff8,0x167));const a978_0x4a99=function(_0x1ffc70,_0x3ff869){_0x1ffc70=_0x1ffc70-0x0;let _0x4a99d7=a978_0x3ff8[_0x1ffc70];return _0x4a99d7;};const _0x42c0b8=a978_0x4a99;'use strict';const util=require(_0x42c0b8('0x5')),logger=require(_0x42c0b8('0x1'))('migration'),Sequence=function(){};Sequence[_0x42c0b8('0x9')][_0x42c0b8('0xb')]=function(_0x434eed){const _0x37e99a=_0x42c0b8;this[_0x37e99a('0x1a')]=this[_0x37e99a('0x1a')]?this['tail'][_0x37e99a('0x0')](_0x434eed):_0x434eed();};const Migration=function(_0xa73985){const _0x26ac60=_0x42c0b8;this['queryInterface']=_0xa73985,this[_0x26ac60('0xa')]=new Sequence();};Migration[_0x42c0b8('0x9')][_0x42c0b8('0x13')]=function(_0x16ba4f,_0x5019d6,_0xa42291){const _0x11142f=_0x42c0b8,_0x1d4787=this;this[_0x11142f('0xa')][_0x11142f('0xb')](function(){const _0x2994b7=_0x11142f;return _0x1d4787[_0x2994b7('0x12')]['changeColumn'](_0x16ba4f,_0x5019d6,_0xa42291)['then'](function(){const _0x1d3c16=_0x2994b7;logger[_0x1d3c16('0x19')](_0x1d3c16('0x10'),_0x5019d6,_0x16ba4f);})[_0x2994b7('0x21')](function(_0x19baeb){const _0x46ee74=_0x2994b7;logger[_0x46ee74('0x19')](JSON[_0x46ee74('0xf')](_0x19baeb));});});},Migration[_0x42c0b8('0x9')][_0x42c0b8('0x1f')]=function(_0x117950,_0x34ef0c,_0x3b6fce){const _0x3926c3=_0x42c0b8,_0x35fbb2=this;this[_0x3926c3('0xa')][_0x3926c3('0xb')](function(){const _0x28346d=_0x3926c3;return _0x35fbb2[_0x28346d('0x12')][_0x28346d('0x1f')](_0x117950,_0x34ef0c,_0x3b6fce)[_0x28346d('0x1b')](function(){const _0x574fe4=_0x28346d;logger[_0x574fe4('0x19')](_0x574fe4('0x8'),_0x34ef0c,_0x117950);})['catch'](function(_0x262143){const _0x1cebdc=_0x28346d;logger[_0x1cebdc('0x19')](JSON['stringify'](_0x262143));});});},Migration['prototype'][_0x42c0b8('0x14')]=function(_0x4f5591){const _0x13e22c=_0x42c0b8,_0x5375b2=this;this[_0x13e22c('0xa')][_0x13e22c('0xb')](function(){const _0x5ce63a=_0x13e22c;return _0x5375b2[_0x5ce63a('0x12')][_0x5ce63a('0x14')](_0x4f5591,{'force':!![]})[_0x5ce63a('0x1b')](function(){const _0x1b7217=_0x5ce63a;logger[_0x1b7217('0x19')](_0x1b7217('0x1c'),_0x4f5591);})[_0x5ce63a('0x21')](function(_0x89efb){const _0x3c7562=_0x5ce63a;logger[_0x3c7562('0x19')](JSON[_0x3c7562('0xf')](_0x89efb));});});},Migration[_0x42c0b8('0x9')][_0x42c0b8('0xe')]=function(_0x1fa228,_0x549e11,_0x367ad6){const _0x50f255=_0x42c0b8,_0x4976c2=this;this[_0x50f255('0xa')][_0x50f255('0xb')](function(){const _0x5a6b3b=_0x50f255;return _0x4976c2[_0x5a6b3b('0x12')]['addIndex'](_0x1fa228,_0x549e11,{'indexName':_0x367ad6[_0x5a6b3b('0x4')],'indicesType':_0x367ad6['indicesType']})['then'](function(){const _0x4b3fa7=_0x5a6b3b;logger[_0x4b3fa7('0x19')](_0x4b3fa7('0x3'),_0x1fa228,_0x549e11[_0x4b3fa7('0xd')](','),_0x367ad6[_0x4b3fa7('0x4')],_0x367ad6[_0x4b3fa7('0x11')]);})[_0x5a6b3b('0x21')](function(_0x5ee698){logger['info'](JSON['stringify'](_0x5ee698));});});},Migration[_0x42c0b8('0x9')][_0x42c0b8('0x1e')]=function(_0x5731e5,_0x5da512){const _0x2380f4=_0x42c0b8,_0x5c57e4=this;this[_0x2380f4('0xa')][_0x2380f4('0xb')](function(){const _0x511020=_0x2380f4;return _0x5c57e4[_0x511020('0x12')][_0x511020('0x1e')](_0x5731e5,_0x5da512)[_0x511020('0x1b')](function(){logger['info']('removeIndex\x20%s\x20%s',_0x5731e5,_0x5da512);})[_0x511020('0x21')](function(_0x9e86b2){const _0x43af0d=_0x511020;logger[_0x43af0d('0x19')](JSON[_0x43af0d('0xf')](_0x9e86b2));});});},Migration[_0x42c0b8('0x9')][_0x42c0b8('0x1d')]=function(_0x21430c){const _0x25ad8e=_0x42c0b8,_0x1d2c48=this;this[_0x25ad8e('0xa')][_0x25ad8e('0xb')](function(){const _0x3bca9b=_0x25ad8e;return _0x1d2c48[_0x3bca9b('0x12')][_0x3bca9b('0x15')][_0x3bca9b('0x1d')](_0x21430c)[_0x3bca9b('0x1b')](function(){const _0x36fbd7=_0x3bca9b;logger[_0x36fbd7('0x19')](_0x36fbd7('0x2'),_0x21430c);})[_0x3bca9b('0x21')](function(_0xecb57c){const _0x13d8be=_0x3bca9b;logger[_0x13d8be('0x19')](JSON[_0x13d8be('0xf')](_0xecb57c));});});},Migration['prototype'][_0x42c0b8('0x18')]=function(_0x36798d,_0x525380){const _0x4143b2=this;this['sequence']['enqueue'](function(){const _0x26bc87=a978_0x4a99;return _0x4143b2[_0x26bc87('0x12')]['removeColumn'](_0x36798d,_0x525380)[_0x26bc87('0x1b')](function(){const _0x2a1351=_0x26bc87;logger[_0x2a1351('0x19')](_0x2a1351('0x7'),_0x525380,_0x36798d);})[_0x26bc87('0x21')](function(_0x203328){const _0xee112c=_0x26bc87;logger[_0xee112c('0x19')](util[_0xee112c('0x6')](_0x203328,{'showHidden':![],'depth':null}));});});},Migration[_0x42c0b8('0x9')]['renameColumn']=function(_0x31a921,_0x1ddecd,_0x57850e){const _0x42ae3d=_0x42c0b8,_0xcf80a=this;this[_0x42ae3d('0xa')]['enqueue'](function(){const _0x1465f9=_0x42ae3d;return _0xcf80a[_0x1465f9('0x12')][_0x1465f9('0x16')](_0x31a921,_0x1ddecd,_0x57850e)['then'](function(){const _0x520140=_0x1465f9;logger[_0x520140('0x19')](_0x520140('0xc'),_0x1ddecd,_0x57850e,_0x31a921);})[_0x1465f9('0x21')](function(_0x400f33){const _0x540a63=_0x1465f9;logger[_0x540a63('0x19')](util[_0x540a63('0x6')](_0x400f33,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x42c0b8('0x20')]=function(_0xcaae5){const _0x23911c=_0x42c0b8;this[_0x23911c('0xa')]['enqueue'](function(){return _0xcaae5();});},module[_0x42c0b8('0x17')]={'up':function(_0x7a7fcb){return new Promise(function(_0x4698da){const _0x46ce22=a978_0x4a99,_0x463879=new Migration(_0x7a7fcb);_0x463879[_0x46ce22('0x20')](_0x4698da);});},'down':function(){}};