Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.61.js
1 const a1104_0x51be=['sequence','info','final','query','prototype','inspect','addIndex\x20%s\x20%s\x20%s','migration','addColumn','queryInterface','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','finally','Changed\x20column\x20%s\x20in\x20table\x20%s','query\x20%s','catch','changeColumn','util','exports','renameColumn','enqueue','dropTable','stringify','sequelize','then','addIndex','tail','removeColumn'];(function(_0x25b25d,_0x11847b){const _0x51be88=function(_0x4df752){while(--_0x4df752){_0x25b25d['push'](_0x25b25d['shift']());}};_0x51be88(++_0x11847b);}(a1104_0x51be,0x1bf));const a1104_0x4df7=function(_0x25b25d,_0x11847b){_0x25b25d=_0x25b25d-0x191;let _0x51be88=a1104_0x51be[_0x25b25d];return _0x51be88;};const a1104_0x462eb4=a1104_0x4df7;'use strict';const util=require(a1104_0x462eb4(0x192)),logger=require('../config/logger')(a1104_0x462eb4(0x1a4)),Sequence=function(){};Sequence[a1104_0x462eb4(0x1a1)][a1104_0x462eb4(0x195)]=function(_0x594d3b){const _0x1f76f0=a1104_0x462eb4;this[_0x1f76f0(0x19b)]=this[_0x1f76f0(0x19b)]?this[_0x1f76f0(0x19b)][_0x1f76f0(0x1a8)](_0x594d3b):_0x594d3b();};const Migration=function(_0x455894){const _0x45cec1=a1104_0x462eb4;this[_0x45cec1(0x1a6)]=_0x455894,this['sequence']=new Sequence();};Migration['prototype'][a1104_0x462eb4(0x191)]=function(_0x24fc8d,_0x56dd19,_0x5e2cb2){const _0x567217=a1104_0x462eb4,_0x241727=this;this['sequence'][_0x567217(0x195)](function(){const _0x505a86=_0x567217;return _0x241727[_0x505a86(0x1a6)][_0x505a86(0x191)](_0x24fc8d,_0x56dd19,_0x5e2cb2)['then'](function(){const _0x60c018=_0x505a86;logger['info'](_0x60c018(0x1a9),_0x56dd19,_0x24fc8d);})[_0x505a86(0x1ab)](function(_0x572e3d){const _0x50fa25=_0x505a86;logger[_0x50fa25(0x19e)](JSON['stringify'](_0x572e3d));});});},Migration[a1104_0x462eb4(0x1a1)][a1104_0x462eb4(0x1a5)]=function(_0x12a8dc,_0x4e2b9b,_0x30087f){const _0xcdb88f=a1104_0x462eb4,_0x267a75=this;this[_0xcdb88f(0x19d)][_0xcdb88f(0x195)](function(){const _0x153d81=_0xcdb88f;return _0x267a75['queryInterface']['addColumn'](_0x12a8dc,_0x4e2b9b,_0x30087f)[_0x153d81(0x199)](function(){const _0xd96acd=_0x153d81;logger[_0xd96acd(0x19e)]('Added\x20column\x20%s\x20to\x20%s',_0x4e2b9b,_0x12a8dc);})[_0x153d81(0x1ab)](function(_0x4a9be3){const _0x277550=_0x153d81;logger[_0x277550(0x19e)](JSON[_0x277550(0x197)](_0x4a9be3));});});},Migration['prototype'][a1104_0x462eb4(0x196)]=function(_0x28c37d){const _0x19ce4d=a1104_0x462eb4,_0x24cf65=this;this[_0x19ce4d(0x19d)]['enqueue'](function(){const _0xf1bf77=_0x19ce4d;return _0x24cf65[_0xf1bf77(0x1a6)]['dropTable'](_0x28c37d,{'force':!![]})[_0xf1bf77(0x199)](function(){logger['info']('table\x20dropped\x20%s',_0x28c37d);})['catch'](function(_0x4d203e){const _0x450e68=_0xf1bf77;logger[_0x450e68(0x19e)](JSON[_0x450e68(0x197)](_0x4d203e));});});},Migration[a1104_0x462eb4(0x1a1)][a1104_0x462eb4(0x19a)]=function(_0x4e30a6,_0x5eea81,_0x4a55aa){const _0x38906f=a1104_0x462eb4,_0x174290=this;this[_0x38906f(0x19d)][_0x38906f(0x195)](function(){const _0x163e46=_0x38906f;return _0x174290['queryInterface'][_0x163e46(0x19a)](_0x4e30a6,_0x5eea81,{'indexName':_0x4a55aa})[_0x163e46(0x199)](function(){const _0x5741af=_0x163e46;logger['info'](_0x5741af(0x1a3),_0x4e30a6,_0x5eea81['join'](','),_0x4a55aa);})['catch'](function(_0x5631cb){const _0x880ce1=_0x163e46;logger[_0x880ce1(0x19e)](JSON[_0x880ce1(0x197)](_0x5631cb));});});},Migration[a1104_0x462eb4(0x1a1)][a1104_0x462eb4(0x1a0)]=function(_0x412559){const _0x4eb051=a1104_0x462eb4,_0x447dca=this;this[_0x4eb051(0x19d)][_0x4eb051(0x195)](function(){const _0x41e154=_0x4eb051;return _0x447dca[_0x41e154(0x1a6)][_0x41e154(0x198)]['query'](_0x412559)[_0x41e154(0x199)](function(){const _0xef1a9=_0x41e154;logger['info'](_0xef1a9(0x1aa),_0x412559);})[_0x41e154(0x1ab)](function(_0x258a0b){const _0x5c36ba=_0x41e154;logger[_0x5c36ba(0x19e)](JSON['stringify'](_0x258a0b));});});},Migration[a1104_0x462eb4(0x1a1)][a1104_0x462eb4(0x19c)]=function(_0x16ba45,_0x54cb93){const _0x2d1147=this;this['sequence']['enqueue'](function(){const _0x5f0ee8=a1104_0x4df7;return _0x2d1147[_0x5f0ee8(0x1a6)][_0x5f0ee8(0x19c)](_0x16ba45,_0x54cb93)['then'](function(){const _0x23f0be=_0x5f0ee8;logger[_0x23f0be(0x19e)]('Removed\x20column\x20%s\x20from\x20%s',_0x54cb93,_0x16ba45);})[_0x5f0ee8(0x1ab)](function(_0x5e7be9){const _0x136f58=_0x5f0ee8;logger[_0x136f58(0x19e)](util[_0x136f58(0x1a2)](_0x5e7be9,{'showHidden':![],'depth':null}));});});},Migration['prototype'][a1104_0x462eb4(0x194)]=function(_0x5866e8,_0x1f5f48,_0x3f0e1e){const _0x38d257=a1104_0x462eb4,_0x1b6ad8=this;this['sequence'][_0x38d257(0x195)](function(){const _0x2f1805=_0x38d257;return _0x1b6ad8[_0x2f1805(0x1a6)][_0x2f1805(0x194)](_0x5866e8,_0x1f5f48,_0x3f0e1e)[_0x2f1805(0x199)](function(){const _0x4e7f42=_0x2f1805;logger[_0x4e7f42(0x19e)](_0x4e7f42(0x1a7),_0x1f5f48,_0x3f0e1e,_0x5866e8);})['catch'](function(_0x70aa6b){const _0x3208e9=_0x2f1805;logger[_0x3208e9(0x19e)](util[_0x3208e9(0x1a2)](_0x70aa6b,{'showHidden':![],'depth':null}));});});},Migration[a1104_0x462eb4(0x1a1)][a1104_0x462eb4(0x19f)]=function(_0x358af1){const _0x589d80=a1104_0x462eb4;this[_0x589d80(0x19d)][_0x589d80(0x195)](function(){return _0x358af1();});},module[a1104_0x462eb4(0x193)]={'up':function(_0xb51a7d){return new Promise(function(_0x28bd3f){const _0x8f51e5=a1104_0x4df7,_0x2dd26c=new Migration(_0xb51a7d);_0x2dd26c[_0x8f51e5(0x19f)](_0x28bd3f);});},'down':function(){}};