184a61a48975206a4778d58605866da378422a6d
[motion-next.git] / server / migrations / 2.2.1.js
1 const a966_0x2a59=['query\x20%s','queryInterface','final','catch','dropTable','exports','sequence','removeIndex','removeColumn','util','Added\x20column\x20%s\x20to\x20%s','enqueue','then','../config/logger','prototype','tail','addIndex','renameColumn','finally','Changed\x20column\x20%s\x20in\x20table\x20%s','removeIndex\x20%s\x20%s','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','table\x20dropped\x20%s','info','migration','addColumn','stringify','changeColumn','query','sequelize','inspect'];(function(_0x46a8dd,_0x2a59e3){const _0xebbc21=function(_0x39c9af){while(--_0x39c9af){_0x46a8dd['push'](_0x46a8dd['shift']());}};_0xebbc21(++_0x2a59e3);}(a966_0x2a59,0x156));const a966_0xebbc=function(_0x46a8dd,_0x2a59e3){_0x46a8dd=_0x46a8dd-0x0;let _0xebbc21=a966_0x2a59[_0x46a8dd];return _0xebbc21;};const _0x150e91=a966_0xebbc;'use strict';const util=require(_0x150e91('0x8')),logger=require(_0x150e91('0xc'))(_0x150e91('0x17')),Sequence=function(){};Sequence['prototype']['enqueue']=function(_0x39c9af){const _0x58c504=_0x150e91;this[_0x58c504('0xe')]=this[_0x58c504('0xe')]?this['tail'][_0x58c504('0x11')](_0x39c9af):_0x39c9af();};const Migration=function(_0x26b1af){const _0x49445b=_0x150e91;this['queryInterface']=_0x26b1af,this[_0x49445b('0x5')]=new Sequence();};Migration[_0x150e91('0xd')]['changeColumn']=function(_0x3b6e4c,_0x520ce4,_0x5098bb){const _0x3ede4c=_0x150e91,_0xf62e1b=this;this[_0x3ede4c('0x5')][_0x3ede4c('0xa')](function(){const _0x418d89=_0x3ede4c;return _0xf62e1b['queryInterface'][_0x418d89('0x1a')](_0x3b6e4c,_0x520ce4,_0x5098bb)[_0x418d89('0xb')](function(){const _0x1f8f5c=_0x418d89;logger[_0x1f8f5c('0x16')](_0x1f8f5c('0x12'),_0x520ce4,_0x3b6e4c);})[_0x418d89('0x2')](function(_0x596c24){const _0x551caf=_0x418d89;logger[_0x551caf('0x16')](JSON['stringify'](_0x596c24));});});},Migration['prototype'][_0x150e91('0x18')]=function(_0x4a4814,_0x1e5dd7,_0x1f98a9){const _0x55e04b=_0x150e91,_0x1e6c06=this;this['sequence'][_0x55e04b('0xa')](function(){const _0x15fc1c=_0x55e04b;return _0x1e6c06[_0x15fc1c('0x0')]['addColumn'](_0x4a4814,_0x1e5dd7,_0x1f98a9)[_0x15fc1c('0xb')](function(){const _0x59da35=_0x15fc1c;logger[_0x59da35('0x16')](_0x59da35('0x9'),_0x1e5dd7,_0x4a4814);})[_0x15fc1c('0x2')](function(_0x109901){const _0xe498e9=_0x15fc1c;logger[_0xe498e9('0x16')](JSON['stringify'](_0x109901));});});},Migration[_0x150e91('0xd')][_0x150e91('0x3')]=function(_0x202f2e){const _0x1f614e=_0x150e91,_0x5d3338=this;this[_0x1f614e('0x5')][_0x1f614e('0xa')](function(){const _0x2cc4df=_0x1f614e;return _0x5d3338[_0x2cc4df('0x0')][_0x2cc4df('0x3')](_0x202f2e,{'force':!![]})[_0x2cc4df('0xb')](function(){const _0x171691=_0x2cc4df;logger['info'](_0x171691('0x15'),_0x202f2e);})[_0x2cc4df('0x2')](function(_0x41df1b){const _0x3582d0=_0x2cc4df;logger[_0x3582d0('0x16')](JSON['stringify'](_0x41df1b));});});},Migration['prototype'][_0x150e91('0xf')]=function(_0x225e7c,_0x5496af,_0x40a59e){const _0x440193=_0x150e91,_0x45b84d=this;this[_0x440193('0x5')][_0x440193('0xa')](function(){const _0x1d10de=_0x440193;return _0x45b84d[_0x1d10de('0x0')][_0x1d10de('0xf')](_0x225e7c,_0x5496af,{'indexName':_0x40a59e})['then'](function(){const _0x44f098=_0x1d10de;logger[_0x44f098('0x16')]('addIndex\x20%s\x20%s\x20%s',_0x225e7c,_0x5496af['join'](','),_0x40a59e);})[_0x1d10de('0x2')](function(_0x14f13a){const _0x134c6b=_0x1d10de;logger['info'](JSON[_0x134c6b('0x19')](_0x14f13a));});});},Migration['prototype']['removeIndex']=function(_0x3b4337,_0xd7b407){const _0x31eaa9=_0x150e91,_0x129a70=this;this[_0x31eaa9('0x5')]['enqueue'](function(){const _0x338cae=_0x31eaa9;return _0x129a70['queryInterface'][_0x338cae('0x6')](_0x3b4337,_0xd7b407)[_0x338cae('0xb')](function(){const _0x5f3d06=_0x338cae;logger[_0x5f3d06('0x16')](_0x5f3d06('0x13'),_0x3b4337,_0xd7b407);})[_0x338cae('0x2')](function(_0x2570ae){const _0x1bd891=_0x338cae;logger[_0x1bd891('0x16')](JSON[_0x1bd891('0x19')](_0x2570ae));});});},Migration[_0x150e91('0xd')]['query']=function(_0x5208fd){const _0x4edee3=_0x150e91,_0x58aa82=this;this[_0x4edee3('0x5')][_0x4edee3('0xa')](function(){const _0x278899=_0x4edee3;return _0x58aa82[_0x278899('0x0')][_0x278899('0x1c')][_0x278899('0x1b')](_0x5208fd)[_0x278899('0xb')](function(){const _0x4b7dcd=_0x278899;logger['info'](_0x4b7dcd('0x1e'),_0x5208fd);})[_0x278899('0x2')](function(_0x48715c){const _0x18b3ca=_0x278899;logger['info'](JSON[_0x18b3ca('0x19')](_0x48715c));});});},Migration[_0x150e91('0xd')][_0x150e91('0x7')]=function(_0x2adb25,_0x4bf926){const _0x5b6b8b=_0x150e91,_0x421373=this;this[_0x5b6b8b('0x5')][_0x5b6b8b('0xa')](function(){const _0x34b2ab=_0x5b6b8b;return _0x421373['queryInterface'][_0x34b2ab('0x7')](_0x2adb25,_0x4bf926)[_0x34b2ab('0xb')](function(){logger['info']('Removed\x20column\x20%s\x20from\x20%s',_0x4bf926,_0x2adb25);})['catch'](function(_0x17c487){const _0x191a85=_0x34b2ab;logger[_0x191a85('0x16')](util[_0x191a85('0x1d')](_0x17c487,{'showHidden':![],'depth':null}));});});},Migration[_0x150e91('0xd')][_0x150e91('0x10')]=function(_0x16337a,_0x4366bb,_0x3f107e){const _0x37604e=_0x150e91,_0x127693=this;this[_0x37604e('0x5')][_0x37604e('0xa')](function(){const _0x291eca=_0x37604e;return _0x127693['queryInterface'][_0x291eca('0x10')](_0x16337a,_0x4366bb,_0x3f107e)[_0x291eca('0xb')](function(){const _0x4eeb2f=_0x291eca;logger[_0x4eeb2f('0x16')](_0x4eeb2f('0x14'),_0x4366bb,_0x3f107e,_0x16337a);})[_0x291eca('0x2')](function(_0x3dde3c){logger['info'](util['inspect'](_0x3dde3c,{'showHidden':![],'depth':null}));});});},Migration['prototype']['final']=function(_0x47d23b){const _0x5af40c=_0x150e91;this[_0x5af40c('0x5')][_0x5af40c('0xa')](function(){return _0x47d23b();});},module[_0x150e91('0x4')]={'up':function(_0x3897b6){return new Promise(function(_0x150845){const _0x3862db=a966_0xebbc,_0x30ac69=new Migration(_0x3897b6);_0x30ac69[_0x3862db('0x1')](_0x150845);});},'down':function(){}};