Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / migrations / 2.4.14.js
1 const a997_0x591e=['catch','tail','../config/logger','changeColumn','queryInterface','table\x20dropped\x20%s','addIndex\x20%s\x20%s\x20%s\x20[%s]','info','renameColumn','query\x20%s','indexName','enqueue','sequelize','Changed\x20column\x20%s\x20in\x20table\x20%s','exports','removeColumn','removeIndex\x20%s\x20%s','sequence','dropTable','then','stringify','removeIndex','finally','inspect','indicesType','prototype','Added\x20column\x20%s\x20to\x20%s','final','join'];(function(_0x12ff05,_0x591e5f){const _0x24d2a5=function(_0x42d323){while(--_0x42d323){_0x12ff05['push'](_0x12ff05['shift']());}};_0x24d2a5(++_0x591e5f);}(a997_0x591e,0x6d));const a997_0x24d2=function(_0x12ff05,_0x591e5f){_0x12ff05=_0x12ff05-0x0;let _0x24d2a5=a997_0x591e[_0x12ff05];return _0x24d2a5;};const _0x42634a=a997_0x24d2;'use strict';const util=require('util'),logger=require(_0x42634a('0x9'))('migration'),Sequence=function(){};Sequence['prototype'][_0x42634a('0x12')]=function(_0x42d323){const _0x501498=_0x42634a;this['tail']=this[_0x501498('0x8')]?this[_0x501498('0x8')][_0x501498('0x0')](_0x42d323):_0x42d323();};const Migration=function(_0xcb0895){const _0xfd4472=_0x42634a;this[_0xfd4472('0xb')]=_0xcb0895,this['sequence']=new Sequence();};Migration[_0x42634a('0x3')][_0x42634a('0xa')]=function(_0x54c695,_0x503889,_0x25e250){const _0x1ab579=_0x42634a,_0x2ee65e=this;this[_0x1ab579('0x18')][_0x1ab579('0x12')](function(){const _0x28cea5=_0x1ab579;return _0x2ee65e[_0x28cea5('0xb')][_0x28cea5('0xa')](_0x54c695,_0x503889,_0x25e250)[_0x28cea5('0x1a')](function(){const _0x21c73a=_0x28cea5;logger[_0x21c73a('0xe')](_0x21c73a('0x14'),_0x503889,_0x54c695);})[_0x28cea5('0x7')](function(_0x456ef4){logger['info'](JSON['stringify'](_0x456ef4));});});},Migration[_0x42634a('0x3')]['addColumn']=function(_0x5a0b40,_0x859c52,_0x4aec3d){const _0x3916df=_0x42634a,_0x5dda93=this;this[_0x3916df('0x18')]['enqueue'](function(){const _0xff9c55=_0x3916df;return _0x5dda93[_0xff9c55('0xb')]['addColumn'](_0x5a0b40,_0x859c52,_0x4aec3d)['then'](function(){const _0x4784b0=_0xff9c55;logger['info'](_0x4784b0('0x4'),_0x859c52,_0x5a0b40);})[_0xff9c55('0x7')](function(_0x50679a){const _0x4c07c9=_0xff9c55;logger[_0x4c07c9('0xe')](JSON[_0x4c07c9('0x1b')](_0x50679a));});});},Migration['prototype'][_0x42634a('0x19')]=function(_0xd46897){const _0x52c70a=_0x42634a,_0x23df32=this;this[_0x52c70a('0x18')][_0x52c70a('0x12')](function(){const _0x53a020=_0x52c70a;return _0x23df32[_0x53a020('0xb')][_0x53a020('0x19')](_0xd46897,{'force':!![]})[_0x53a020('0x1a')](function(){const _0x18fb30=_0x53a020;logger[_0x18fb30('0xe')](_0x18fb30('0xc'),_0xd46897);})['catch'](function(_0x40f157){const _0xc48b60=_0x53a020;logger[_0xc48b60('0xe')](JSON['stringify'](_0x40f157));});});},Migration[_0x42634a('0x3')]['addIndex']=function(_0x40c906,_0x54e6c5,_0x3d2b00){const _0x3de7c1=_0x42634a,_0x5cd1ff=this;this[_0x3de7c1('0x18')][_0x3de7c1('0x12')](function(){const _0xcb1be3=_0x3de7c1;return _0x5cd1ff[_0xcb1be3('0xb')]['addIndex'](_0x40c906,_0x54e6c5,{'indexName':_0x3d2b00[_0xcb1be3('0x11')],'indicesType':_0x3d2b00[_0xcb1be3('0x2')]})[_0xcb1be3('0x1a')](function(){const _0x561b82=_0xcb1be3;logger[_0x561b82('0xe')](_0x561b82('0xd'),_0x40c906,_0x54e6c5[_0x561b82('0x6')](','),_0x3d2b00[_0x561b82('0x11')],_0x3d2b00[_0x561b82('0x2')]);})[_0xcb1be3('0x7')](function(_0x36de28){const _0x2974a0=_0xcb1be3;logger[_0x2974a0('0xe')](JSON[_0x2974a0('0x1b')](_0x36de28));});});},Migration['prototype'][_0x42634a('0x1c')]=function(_0x5a643c,_0xac010f){const _0x58bc61=_0x42634a,_0x3a82e0=this;this[_0x58bc61('0x18')]['enqueue'](function(){const _0x4f8ae8=_0x58bc61;return _0x3a82e0['queryInterface']['removeIndex'](_0x5a643c,_0xac010f)['then'](function(){const _0x1c33fc=a997_0x24d2;logger[_0x1c33fc('0xe')](_0x1c33fc('0x17'),_0x5a643c,_0xac010f);})[_0x4f8ae8('0x7')](function(_0x53d169){logger['info'](JSON['stringify'](_0x53d169));});});},Migration[_0x42634a('0x3')]['query']=function(_0x5df364){const _0x4716cc=_0x42634a,_0x51e159=this;this['sequence'][_0x4716cc('0x12')](function(){const _0x2a8321=_0x4716cc;return _0x51e159[_0x2a8321('0xb')][_0x2a8321('0x13')]['query'](_0x5df364)['then'](function(){const _0x56d4d7=_0x2a8321;logger[_0x56d4d7('0xe')](_0x56d4d7('0x10'),_0x5df364);})['catch'](function(_0x514bd8){const _0x2d421e=_0x2a8321;logger[_0x2d421e('0xe')](JSON[_0x2d421e('0x1b')](_0x514bd8));});});},Migration[_0x42634a('0x3')][_0x42634a('0x16')]=function(_0x6ab26,_0x326899){const _0x5a25fe=_0x42634a,_0x1f4abc=this;this[_0x5a25fe('0x18')]['enqueue'](function(){const _0x27143c=_0x5a25fe;return _0x1f4abc[_0x27143c('0xb')]['removeColumn'](_0x6ab26,_0x326899)[_0x27143c('0x1a')](function(){const _0x3f445c=_0x27143c;logger[_0x3f445c('0xe')]('Removed\x20column\x20%s\x20from\x20%s',_0x326899,_0x6ab26);})[_0x27143c('0x7')](function(_0x360c5b){const _0x26dd96=_0x27143c;logger['info'](util[_0x26dd96('0x1')](_0x360c5b,{'showHidden':![],'depth':null}));});});},Migration[_0x42634a('0x3')][_0x42634a('0xf')]=function(_0x476ab9,_0x3b93be,_0xa4ad69){const _0x27f8d7=_0x42634a,_0x362808=this;this[_0x27f8d7('0x18')][_0x27f8d7('0x12')](function(){const _0x554b93=_0x27f8d7;return _0x362808[_0x554b93('0xb')][_0x554b93('0xf')](_0x476ab9,_0x3b93be,_0xa4ad69)['then'](function(){const _0x370ae5=_0x554b93;logger[_0x370ae5('0xe')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x3b93be,_0xa4ad69,_0x476ab9);})['catch'](function(_0x5ba4fe){const _0x50fbec=_0x554b93;logger[_0x50fbec('0xe')](util[_0x50fbec('0x1')](_0x5ba4fe,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x42634a('0x5')]=function(_0x3dc448){const _0x32a368=_0x42634a;this[_0x32a368('0x18')]['enqueue'](function(){return _0x3dc448();});},module[_0x42634a('0x15')]={'up':function(_0x23e4db){return new Promise(function(_0x408902){const _0x390e96=new Migration(_0x23e4db);_0x390e96['final'](_0x408902);});},'down':function(){}};