Built motion from commit df3e9871f6bcc3432fec345b2f4facbd4dba8b5c. Version 3.0.0...
[motion-next.git] / server / migrations / 2.3.8.js
1 const a981_0xdbc0=['sequence','Removed\x20column\x20%s\x20from\x20%s','addIndex','queryInterface','inspect','then','final','Changed\x20column\x20%s\x20in\x20table\x20%s','stringify','info','finally','renameColumn','removeIndex\x20%s\x20%s','../config/logger','enqueue','tail','join','dropTable','changeColumn','addColumn','query','removeColumn','util','sequelize','prototype','catch','removeIndex','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','table\x20dropped\x20%s'];(function(_0x54b771,_0xdbc0f1){const _0x4375b4=function(_0x37e1d7){while(--_0x37e1d7){_0x54b771['push'](_0x54b771['shift']());}};_0x4375b4(++_0xdbc0f1);}(a981_0xdbc0,0x1ef));const a981_0x4375=function(_0x54b771,_0xdbc0f1){_0x54b771=_0x54b771-0x0;let _0x4375b4=a981_0xdbc0[_0x54b771];return _0x4375b4;};const _0x490af5=a981_0x4375;'use strict';const util=require(_0x490af5('0x14')),logger=require(_0x490af5('0xb'))('migration'),Sequence=function(){};Sequence['prototype']['enqueue']=function(_0x37e1d7){const _0x4492a2=_0x490af5;this[_0x4492a2('0xd')]=this[_0x4492a2('0xd')]?this[_0x4492a2('0xd')][_0x4492a2('0x8')](_0x37e1d7):_0x37e1d7();};const Migration=function(_0x2d708b){const _0x27f1eb=_0x490af5;this[_0x27f1eb('0x1')]=_0x2d708b,this['sequence']=new Sequence();};Migration[_0x490af5('0x16')][_0x490af5('0x10')]=function(_0x1a7c94,_0x5309c9,_0x127152){const _0x54f714=_0x490af5,_0x31dc93=this;this[_0x54f714('0x1b')]['enqueue'](function(){const _0x40a412=_0x54f714;return _0x31dc93[_0x40a412('0x1')]['changeColumn'](_0x1a7c94,_0x5309c9,_0x127152)[_0x40a412('0x3')](function(){const _0x2d0743=_0x40a412;logger['info'](_0x2d0743('0x5'),_0x5309c9,_0x1a7c94);})[_0x40a412('0x17')](function(_0x550b60){const _0x5ebb57=_0x40a412;logger['info'](JSON[_0x5ebb57('0x6')](_0x550b60));});});},Migration[_0x490af5('0x16')]['addColumn']=function(_0x29b011,_0x532321,_0x46df7b){const _0x2ffb53=this;this['sequence']['enqueue'](function(){const _0x538214=a981_0x4375;return _0x2ffb53[_0x538214('0x1')][_0x538214('0x11')](_0x29b011,_0x532321,_0x46df7b)[_0x538214('0x3')](function(){const _0x2765c2=_0x538214;logger[_0x2765c2('0x7')]('Added\x20column\x20%s\x20to\x20%s',_0x532321,_0x29b011);})[_0x538214('0x17')](function(_0x4ae14d){const _0x52af80=_0x538214;logger[_0x52af80('0x7')](JSON['stringify'](_0x4ae14d));});});},Migration[_0x490af5('0x16')][_0x490af5('0xf')]=function(_0x374d08){const _0xfa4324=_0x490af5,_0x12cb34=this;this[_0xfa4324('0x1b')][_0xfa4324('0xc')](function(){const _0x1e8e35=_0xfa4324;return _0x12cb34['queryInterface'][_0x1e8e35('0xf')](_0x374d08,{'force':!![]})[_0x1e8e35('0x3')](function(){const _0xe7cc09=_0x1e8e35;logger[_0xe7cc09('0x7')](_0xe7cc09('0x1a'),_0x374d08);})[_0x1e8e35('0x17')](function(_0xf9cd34){const _0x216da8=_0x1e8e35;logger[_0x216da8('0x7')](JSON[_0x216da8('0x6')](_0xf9cd34));});});},Migration[_0x490af5('0x16')][_0x490af5('0x0')]=function(_0xca253d,_0x5b1dbf,_0x4d1c49){const _0x15e508=_0x490af5,_0x334146=this;this['sequence'][_0x15e508('0xc')](function(){const _0x419af8=_0x15e508;return _0x334146[_0x419af8('0x1')][_0x419af8('0x0')](_0xca253d,_0x5b1dbf,{'indexName':_0x4d1c49})[_0x419af8('0x3')](function(){const _0xccac33=_0x419af8;logger['info']('addIndex\x20%s\x20%s\x20%s',_0xca253d,_0x5b1dbf[_0xccac33('0xe')](','),_0x4d1c49);})[_0x419af8('0x17')](function(_0x19f573){const _0x3882c6=_0x419af8;logger['info'](JSON[_0x3882c6('0x6')](_0x19f573));});});},Migration[_0x490af5('0x16')][_0x490af5('0x18')]=function(_0x256f93,_0x5555c0){const _0x370210=_0x490af5,_0x57329b=this;this[_0x370210('0x1b')][_0x370210('0xc')](function(){const _0x532e81=_0x370210;return _0x57329b[_0x532e81('0x1')][_0x532e81('0x18')](_0x256f93,_0x5555c0)['then'](function(){const _0x245374=_0x532e81;logger['info'](_0x245374('0xa'),_0x256f93,_0x5555c0);})[_0x532e81('0x17')](function(_0x308676){logger['info'](JSON['stringify'](_0x308676));});});},Migration['prototype']['query']=function(_0x3283a8){const _0x1f6322=_0x490af5,_0x397427=this;this[_0x1f6322('0x1b')][_0x1f6322('0xc')](function(){const _0x58ac15=_0x1f6322;return _0x397427['queryInterface'][_0x58ac15('0x15')][_0x58ac15('0x12')](_0x3283a8)[_0x58ac15('0x3')](function(){logger['info']('query\x20%s',_0x3283a8);})[_0x58ac15('0x17')](function(_0x43c80a){logger['info'](JSON['stringify'](_0x43c80a));});});},Migration['prototype'][_0x490af5('0x13')]=function(_0x1b6432,_0x39353a){const _0x41a0fc=_0x490af5,_0x58ecb2=this;this[_0x41a0fc('0x1b')]['enqueue'](function(){const _0x1d4941=_0x41a0fc;return _0x58ecb2[_0x1d4941('0x1')][_0x1d4941('0x13')](_0x1b6432,_0x39353a)[_0x1d4941('0x3')](function(){const _0x3650f8=_0x1d4941;logger['info'](_0x3650f8('0x1c'),_0x39353a,_0x1b6432);})[_0x1d4941('0x17')](function(_0x1ef08c){const _0x58fe03=_0x1d4941;logger[_0x58fe03('0x7')](util[_0x58fe03('0x2')](_0x1ef08c,{'showHidden':![],'depth':null}));});});},Migration[_0x490af5('0x16')][_0x490af5('0x9')]=function(_0xa22592,_0x32df85,_0x31eac9){const _0x15e0fd=_0x490af5,_0x5e402e=this;this[_0x15e0fd('0x1b')][_0x15e0fd('0xc')](function(){const _0x18f4fe=_0x15e0fd;return _0x5e402e['queryInterface'][_0x18f4fe('0x9')](_0xa22592,_0x32df85,_0x31eac9)[_0x18f4fe('0x3')](function(){const _0x5de08e=_0x18f4fe;logger['info'](_0x5de08e('0x19'),_0x32df85,_0x31eac9,_0xa22592);})['catch'](function(_0x10ec79){logger['info'](util['inspect'](_0x10ec79,{'showHidden':![],'depth':null}));});});},Migration[_0x490af5('0x16')][_0x490af5('0x4')]=function(_0x18e379){const _0x124aee=_0x490af5;this[_0x124aee('0x1b')]['enqueue'](function(){return _0x18e379();});},module['exports']={'up':function(_0x87ac1){return new Promise(function(_0x5debb6){const _0x2f8301=a981_0x4375,_0x335984=new Migration(_0x87ac1);_0x335984[_0x2f8301('0x4')](_0x5debb6);});},'down':function(){}};