583a6ceef630b403865a1164627cbfa59091313b
[motion-next.git] / server / migrations / 2.4.3.js
1 const a1006_0x3b99=['Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','sequence','query','Changed\x20column\x20%s\x20in\x20table\x20%s','inspect','then','addColumn','exports','removeIndex\x20%s\x20%s','enqueue','join','removeIndex','addIndex','removeColumn','table\x20dropped\x20%s','tail','sequelize','final','catch','util','dropTable','info','changeColumn','Removed\x20column\x20%s\x20from\x20%s','renameColumn','indexName','queryInterface','prototype','migration','Added\x20column\x20%s\x20to\x20%s','stringify'];(function(_0xe2e214,_0x3b99e1){const _0x493962=function(_0x5e0ab0){while(--_0x5e0ab0){_0xe2e214['push'](_0xe2e214['shift']());}};_0x493962(++_0x3b99e1);}(a1006_0x3b99,0x13a));const a1006_0x4939=function(_0xe2e214,_0x3b99e1){_0xe2e214=_0xe2e214-0x0;let _0x493962=a1006_0x3b99[_0xe2e214];return _0x493962;};const _0x3ce796=a1006_0x4939;'use strict';const util=require(_0x3ce796('0xf')),logger=require('../config/logger')(_0x3ce796('0x18')),Sequence=function(){};Sequence[_0x3ce796('0x17')][_0x3ce796('0x5')]=function(_0x5e0ab0){const _0x1c704b=_0x3ce796;this[_0x1c704b('0xb')]=this[_0x1c704b('0xb')]?this[_0x1c704b('0xb')]['finally'](_0x5e0ab0):_0x5e0ab0();};const Migration=function(_0xba04ad){const _0x24b050=_0x3ce796;this[_0x24b050('0x16')]=_0xba04ad,this['sequence']=new Sequence();};Migration[_0x3ce796('0x17')]['changeColumn']=function(_0x42a61a,_0x57d4f8,_0x2ca59a){const _0x1f21ba=this;this['sequence']['enqueue'](function(){const _0x185369=a1006_0x4939;return _0x1f21ba[_0x185369('0x16')][_0x185369('0x12')](_0x42a61a,_0x57d4f8,_0x2ca59a)[_0x185369('0x1')](function(){const _0x484916=_0x185369;logger[_0x484916('0x11')](_0x484916('0x1e'),_0x57d4f8,_0x42a61a);})[_0x185369('0xe')](function(_0x383359){const _0x59d4e3=_0x185369;logger[_0x59d4e3('0x11')](JSON[_0x59d4e3('0x1a')](_0x383359));});});},Migration['prototype'][_0x3ce796('0x2')]=function(_0x104115,_0x11e175,_0x913737){const _0x5d773f=_0x3ce796,_0x5ab463=this;this[_0x5d773f('0x1c')][_0x5d773f('0x5')](function(){const _0x41a8c6=_0x5d773f;return _0x5ab463[_0x41a8c6('0x16')][_0x41a8c6('0x2')](_0x104115,_0x11e175,_0x913737)[_0x41a8c6('0x1')](function(){const _0x3ee8dc=_0x41a8c6;logger[_0x3ee8dc('0x11')](_0x3ee8dc('0x19'),_0x11e175,_0x104115);})['catch'](function(_0x1addca){logger['info'](JSON['stringify'](_0x1addca));});});},Migration['prototype'][_0x3ce796('0x10')]=function(_0x57d4b4){const _0x4b4463=_0x3ce796,_0x398d73=this;this[_0x4b4463('0x1c')][_0x4b4463('0x5')](function(){const _0xdbe9a5=_0x4b4463;return _0x398d73[_0xdbe9a5('0x16')][_0xdbe9a5('0x10')](_0x57d4b4,{'force':!![]})[_0xdbe9a5('0x1')](function(){const _0x4fee33=_0xdbe9a5;logger[_0x4fee33('0x11')](_0x4fee33('0xa'),_0x57d4b4);})[_0xdbe9a5('0xe')](function(_0x2f782f){const _0x493edb=_0xdbe9a5;logger[_0x493edb('0x11')](JSON[_0x493edb('0x1a')](_0x2f782f));});});},Migration[_0x3ce796('0x17')]['addIndex']=function(_0x73d2f,_0x25729b,_0x423b8b){const _0xf61cf=_0x3ce796,_0xf4f736=this;this[_0xf61cf('0x1c')]['enqueue'](function(){const _0x12c131=_0xf61cf;return _0xf4f736[_0x12c131('0x16')][_0x12c131('0x8')](_0x73d2f,_0x25729b,{'indexName':_0x423b8b[_0x12c131('0x15')],'indicesType':_0x423b8b['indicesType']})['then'](function(){const _0x2522a0=_0x12c131;logger[_0x2522a0('0x11')]('addIndex\x20%s\x20%s\x20%s\x20[%s]',_0x73d2f,_0x25729b[_0x2522a0('0x6')](','),_0x423b8b['indexName'],_0x423b8b['indicesType']);})['catch'](function(_0x5c4a74){const _0xc5d53a=_0x12c131;logger[_0xc5d53a('0x11')](JSON[_0xc5d53a('0x1a')](_0x5c4a74));});});},Migration[_0x3ce796('0x17')][_0x3ce796('0x7')]=function(_0x179f40,_0x31aaff){const _0x4c3b14=_0x3ce796,_0x1d4ed9=this;this[_0x4c3b14('0x1c')]['enqueue'](function(){const _0x50b26c=_0x4c3b14;return _0x1d4ed9[_0x50b26c('0x16')][_0x50b26c('0x7')](_0x179f40,_0x31aaff)[_0x50b26c('0x1')](function(){const _0x21e891=_0x50b26c;logger['info'](_0x21e891('0x4'),_0x179f40,_0x31aaff);})[_0x50b26c('0xe')](function(_0x18568f){logger['info'](JSON['stringify'](_0x18568f));});});},Migration[_0x3ce796('0x17')]['query']=function(_0x2f7665){const _0x297766=_0x3ce796,_0x2a779e=this;this[_0x297766('0x1c')]['enqueue'](function(){const _0x15d8ed=_0x297766;return _0x2a779e[_0x15d8ed('0x16')][_0x15d8ed('0xc')][_0x15d8ed('0x1d')](_0x2f7665)[_0x15d8ed('0x1')](function(){const _0xdb9181=_0x15d8ed;logger[_0xdb9181('0x11')]('query\x20%s',_0x2f7665);})[_0x15d8ed('0xe')](function(_0x3cc212){const _0x285e53=_0x15d8ed;logger['info'](JSON[_0x285e53('0x1a')](_0x3cc212));});});},Migration[_0x3ce796('0x17')][_0x3ce796('0x9')]=function(_0x11fcf4,_0x3f6e7f){const _0x5b66a6=_0x3ce796,_0x3d057b=this;this[_0x5b66a6('0x1c')][_0x5b66a6('0x5')](function(){const _0x4d65f0=_0x5b66a6;return _0x3d057b[_0x4d65f0('0x16')][_0x4d65f0('0x9')](_0x11fcf4,_0x3f6e7f)[_0x4d65f0('0x1')](function(){const _0x683fd8=_0x4d65f0;logger[_0x683fd8('0x11')](_0x683fd8('0x13'),_0x3f6e7f,_0x11fcf4);})[_0x4d65f0('0xe')](function(_0x1e4915){const _0x3fa002=_0x4d65f0;logger[_0x3fa002('0x11')](util['inspect'](_0x1e4915,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x3ce796('0x14')]=function(_0x412be4,_0x49e9e9,_0x575929){const _0x46c261=_0x3ce796,_0x34c0d0=this;this[_0x46c261('0x1c')][_0x46c261('0x5')](function(){const _0x12528e=_0x46c261;return _0x34c0d0['queryInterface'][_0x12528e('0x14')](_0x412be4,_0x49e9e9,_0x575929)['then'](function(){const _0x2f4bcf=_0x12528e;logger[_0x2f4bcf('0x11')](_0x2f4bcf('0x1b'),_0x49e9e9,_0x575929,_0x412be4);})[_0x12528e('0xe')](function(_0x448286){const _0x39bb7e=_0x12528e;logger['info'](util[_0x39bb7e('0x0')](_0x448286,{'showHidden':![],'depth':null}));});});},Migration[_0x3ce796('0x17')][_0x3ce796('0xd')]=function(_0x4db5a4){this['sequence']['enqueue'](function(){return _0x4db5a4();});},module[_0x3ce796('0x3')]={'up':function(_0x4bb7cc){return new Promise(function(_0x14bb79){const _0x3e8941=a1006_0x4939,_0x1afaf2=new Migration(_0x4bb7cc);_0x1afaf2[_0x3e8941('0xd')](_0x14bb79);});},'down':function(){}};