Built motion from commit 709aa6fb5ed03aa61bc373fcdbf622215d37d30b. Version 3.0.0...
[motion-next.git] / server / migrations / 2.4.1.js
1 const a991_0x5d48=['catch','Removed\x20column\x20%s\x20from\x20%s','inspect','removeIndex','tail','final','enqueue','prototype','Added\x20column\x20%s\x20to\x20%s','join','Changed\x20column\x20%s\x20in\x20table\x20%s','renameColumn','queryInterface','removeIndex\x20%s\x20%s','addColumn','util','sequelize','query\x20%s','sequence','then','indicesType','changeColumn','info','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','dropTable','table\x20dropped\x20%s','addIndex\x20%s\x20%s\x20%s\x20[%s]','finally','stringify'];(function(_0x54104b,_0x5d48d6){const _0x3526f1=function(_0x25a54a){while(--_0x25a54a){_0x54104b['push'](_0x54104b['shift']());}};_0x3526f1(++_0x5d48d6);}(a991_0x5d48,0x85));const a991_0x3526=function(_0x54104b,_0x5d48d6){_0x54104b=_0x54104b-0x0;let _0x3526f1=a991_0x5d48[_0x54104b];return _0x3526f1;};const _0x197c1c=a991_0x3526;'use strict';const util=require(_0x197c1c('0x1b')),logger=require('../config/logger')('migration'),Sequence=function(){};Sequence[_0x197c1c('0x13')][_0x197c1c('0x12')]=function(_0x25a54a){const _0x475bb8=_0x197c1c;this['tail']=this[_0x475bb8('0x10')]?this[_0x475bb8('0x10')][_0x475bb8('0xa')](_0x25a54a):_0x25a54a();};const Migration=function(_0x1d2fcc){const _0x324d16=_0x197c1c;this[_0x324d16('0x18')]=_0x1d2fcc,this[_0x324d16('0x1')]=new Sequence();};Migration[_0x197c1c('0x13')][_0x197c1c('0x4')]=function(_0x397cb7,_0x1f99dd,_0x326d79){const _0x20afa0=_0x197c1c,_0x599086=this;this[_0x20afa0('0x1')]['enqueue'](function(){const _0x5860ea=_0x20afa0;return _0x599086[_0x5860ea('0x18')][_0x5860ea('0x4')](_0x397cb7,_0x1f99dd,_0x326d79)[_0x5860ea('0x2')](function(){const _0x2b000d=_0x5860ea;logger[_0x2b000d('0x5')](_0x2b000d('0x16'),_0x1f99dd,_0x397cb7);})[_0x5860ea('0xc')](function(_0x1a6c8d){const _0x10012e=_0x5860ea;logger[_0x10012e('0x5')](JSON[_0x10012e('0xb')](_0x1a6c8d));});});},Migration['prototype'][_0x197c1c('0x1a')]=function(_0x4cfff1,_0x4ea6a0,_0x507bb7){const _0x541fc2=_0x197c1c,_0x1b8d63=this;this['sequence'][_0x541fc2('0x12')](function(){const _0x1db347=_0x541fc2;return _0x1b8d63[_0x1db347('0x18')][_0x1db347('0x1a')](_0x4cfff1,_0x4ea6a0,_0x507bb7)[_0x1db347('0x2')](function(){const _0x46c318=_0x1db347;logger[_0x46c318('0x5')](_0x46c318('0x14'),_0x4ea6a0,_0x4cfff1);})[_0x1db347('0xc')](function(_0x5d4cbe){const _0x1e9883=_0x1db347;logger['info'](JSON[_0x1e9883('0xb')](_0x5d4cbe));});});},Migration[_0x197c1c('0x13')][_0x197c1c('0x7')]=function(_0x340983){const _0x5b8615=_0x197c1c,_0x576f29=this;this['sequence'][_0x5b8615('0x12')](function(){const _0x1eab6a=_0x5b8615;return _0x576f29['queryInterface']['dropTable'](_0x340983,{'force':!![]})[_0x1eab6a('0x2')](function(){const _0x4e0ae7=_0x1eab6a;logger[_0x4e0ae7('0x5')](_0x4e0ae7('0x8'),_0x340983);})[_0x1eab6a('0xc')](function(_0x4d13a8){const _0x389b3a=_0x1eab6a;logger['info'](JSON[_0x389b3a('0xb')](_0x4d13a8));});});},Migration[_0x197c1c('0x13')]['addIndex']=function(_0x4dc000,_0x3846c3,_0x308037){const _0x2abc80=_0x197c1c,_0x4513a2=this;this[_0x2abc80('0x1')][_0x2abc80('0x12')](function(){const _0x21f00d=_0x2abc80;return _0x4513a2[_0x21f00d('0x18')]['addIndex'](_0x4dc000,_0x3846c3,{'indexName':_0x308037['indexName'],'indicesType':_0x308037[_0x21f00d('0x3')]})['then'](function(){const _0x549e09=_0x21f00d;logger['info'](_0x549e09('0x9'),_0x4dc000,_0x3846c3[_0x549e09('0x15')](','),_0x308037['indexName'],_0x308037[_0x549e09('0x3')]);})[_0x21f00d('0xc')](function(_0x3b9bca){const _0x4f5986=_0x21f00d;logger[_0x4f5986('0x5')](JSON[_0x4f5986('0xb')](_0x3b9bca));});});},Migration[_0x197c1c('0x13')][_0x197c1c('0xf')]=function(_0x208f3c,_0x1051cb){const _0x16f8b9=_0x197c1c,_0x2a6478=this;this['sequence'][_0x16f8b9('0x12')](function(){const _0x1ac4aa=_0x16f8b9;return _0x2a6478[_0x1ac4aa('0x18')][_0x1ac4aa('0xf')](_0x208f3c,_0x1051cb)[_0x1ac4aa('0x2')](function(){const _0x5ade39=_0x1ac4aa;logger[_0x5ade39('0x5')](_0x5ade39('0x19'),_0x208f3c,_0x1051cb);})['catch'](function(_0x3e9474){const _0x6da41a=_0x1ac4aa;logger[_0x6da41a('0x5')](JSON['stringify'](_0x3e9474));});});},Migration[_0x197c1c('0x13')]['query']=function(_0x592458){const _0x8ced59=_0x197c1c,_0x2bd651=this;this[_0x8ced59('0x1')][_0x8ced59('0x12')](function(){const _0x2a34f5=_0x8ced59;return _0x2bd651['queryInterface'][_0x2a34f5('0x1c')]['query'](_0x592458)[_0x2a34f5('0x2')](function(){const _0x209b9f=_0x2a34f5;logger['info'](_0x209b9f('0x0'),_0x592458);})['catch'](function(_0x2ae2ee){const _0x4a40c3=_0x2a34f5;logger[_0x4a40c3('0x5')](JSON[_0x4a40c3('0xb')](_0x2ae2ee));});});},Migration[_0x197c1c('0x13')]['removeColumn']=function(_0x5c77ad,_0x39123a){const _0x408ca5=_0x197c1c,_0x2f46fd=this;this[_0x408ca5('0x1')]['enqueue'](function(){const _0x4ce548=_0x408ca5;return _0x2f46fd['queryInterface']['removeColumn'](_0x5c77ad,_0x39123a)[_0x4ce548('0x2')](function(){const _0x5190da=_0x4ce548;logger[_0x5190da('0x5')](_0x5190da('0xd'),_0x39123a,_0x5c77ad);})['catch'](function(_0x24fd3a){const _0x4d494e=_0x4ce548;logger['info'](util[_0x4d494e('0xe')](_0x24fd3a,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x197c1c('0x17')]=function(_0xf7fe10,_0x2b9b41,_0x328a64){const _0x377ede=_0x197c1c,_0xf1b86a=this;this[_0x377ede('0x1')][_0x377ede('0x12')](function(){const _0x1b0182=_0x377ede;return _0xf1b86a[_0x1b0182('0x18')][_0x1b0182('0x17')](_0xf7fe10,_0x2b9b41,_0x328a64)['then'](function(){const _0x5a9ed0=_0x1b0182;logger[_0x5a9ed0('0x5')](_0x5a9ed0('0x6'),_0x2b9b41,_0x328a64,_0xf7fe10);})['catch'](function(_0x2e0003){const _0x4b9c1b=_0x1b0182;logger[_0x4b9c1b('0x5')](util[_0x4b9c1b('0xe')](_0x2e0003,{'showHidden':![],'depth':null}));});});},Migration[_0x197c1c('0x13')][_0x197c1c('0x11')]=function(_0x4e252b){const _0x198891=_0x197c1c;this[_0x198891('0x1')][_0x198891('0x12')](function(){return _0x4e252b();});},module['exports']={'up':function(_0x499483){return new Promise(function(_0x579713){const _0x5ddb92=a991_0x3526,_0x43e662=new Migration(_0x499483);_0x43e662[_0x5ddb92('0x11')](_0x579713);});},'down':function(){}};