56077779d09a0b2f3b8c58b408f616cd101b0acc
[motion-next.git] / server / migrations / 2.4.17.js
1 const a1000_0x262f=['catch','indexName','tail','sequelize','queryInterface','join','query\x20%s','changeColumn','Added\x20column\x20%s\x20to\x20%s','prototype','indicesType','info','Changed\x20column\x20%s\x20in\x20table\x20%s','then','dropTable','addIndex','Removed\x20column\x20%s\x20from\x20%s','enqueue','final','table\x20dropped\x20%s','renameColumn','stringify','migration','query','sequence','addColumn','removeIndex','inspect','removeColumn','finally'];(function(_0x35d6bb,_0x262f53){const _0x47e35f=function(_0x14f77c){while(--_0x14f77c){_0x35d6bb['push'](_0x35d6bb['shift']());}};_0x47e35f(++_0x262f53);}(a1000_0x262f,0x1cc));const a1000_0x47e3=function(_0x35d6bb,_0x262f53){_0x35d6bb=_0x35d6bb-0x0;let _0x47e35f=a1000_0x262f[_0x35d6bb];return _0x47e35f;};const _0x5c9b96=a1000_0x47e3;'use strict';const util=require('util'),logger=require('../config/logger')(_0x5c9b96('0xc')),Sequence=function(){};Sequence[_0x5c9b96('0x1d')]['enqueue']=function(_0x14f77c){const _0x177992=_0x5c9b96;this[_0x177992('0x16')]=this[_0x177992('0x16')]?this[_0x177992('0x16')][_0x177992('0x13')](_0x14f77c):_0x14f77c();};const Migration=function(_0xa4b92){this['queryInterface']=_0xa4b92,this['sequence']=new Sequence();};Migration[_0x5c9b96('0x1d')]['changeColumn']=function(_0x4c40a0,_0x397708,_0xed21bd){const _0x4a4658=this;this['sequence']['enqueue'](function(){const _0x16d42d=a1000_0x47e3;return _0x4a4658['queryInterface'][_0x16d42d('0x1b')](_0x4c40a0,_0x397708,_0xed21bd)[_0x16d42d('0x3')](function(){const _0x460bd5=_0x16d42d;logger[_0x460bd5('0x1')](_0x460bd5('0x2'),_0x397708,_0x4c40a0);})[_0x16d42d('0x14')](function(_0x27442d){const _0x3987f7=_0x16d42d;logger['info'](JSON[_0x3987f7('0xb')](_0x27442d));});});},Migration[_0x5c9b96('0x1d')][_0x5c9b96('0xf')]=function(_0x1c349f,_0x2195e7,_0x1af15d){const _0x5121d4=_0x5c9b96,_0x556c94=this;this[_0x5121d4('0xe')][_0x5121d4('0x7')](function(){const _0x43a0af=_0x5121d4;return _0x556c94[_0x43a0af('0x18')][_0x43a0af('0xf')](_0x1c349f,_0x2195e7,_0x1af15d)[_0x43a0af('0x3')](function(){const _0x43049d=_0x43a0af;logger['info'](_0x43049d('0x1c'),_0x2195e7,_0x1c349f);})[_0x43a0af('0x14')](function(_0x6a9739){logger['info'](JSON['stringify'](_0x6a9739));});});},Migration[_0x5c9b96('0x1d')][_0x5c9b96('0x4')]=function(_0x194f1e){const _0x1e3488=_0x5c9b96,_0x5b77b4=this;this[_0x1e3488('0xe')]['enqueue'](function(){const _0x36fcd7=_0x1e3488;return _0x5b77b4[_0x36fcd7('0x18')][_0x36fcd7('0x4')](_0x194f1e,{'force':!![]})[_0x36fcd7('0x3')](function(){const _0x3e108a=_0x36fcd7;logger[_0x3e108a('0x1')](_0x3e108a('0x9'),_0x194f1e);})['catch'](function(_0x5420bf){const _0x5b2598=_0x36fcd7;logger[_0x5b2598('0x1')](JSON[_0x5b2598('0xb')](_0x5420bf));});});},Migration[_0x5c9b96('0x1d')][_0x5c9b96('0x5')]=function(_0x40baa3,_0x30b379,_0x4273c5){const _0x8367f3=_0x5c9b96,_0x3f0b6c=this;this['sequence'][_0x8367f3('0x7')](function(){const _0x5de57a=_0x8367f3;return _0x3f0b6c[_0x5de57a('0x18')]['addIndex'](_0x40baa3,_0x30b379,{'indexName':_0x4273c5[_0x5de57a('0x15')],'indicesType':_0x4273c5[_0x5de57a('0x0')]})[_0x5de57a('0x3')](function(){const _0x226d87=_0x5de57a;logger[_0x226d87('0x1')]('addIndex\x20%s\x20%s\x20%s\x20[%s]',_0x40baa3,_0x30b379[_0x226d87('0x19')](','),_0x4273c5[_0x226d87('0x15')],_0x4273c5['indicesType']);})['catch'](function(_0x3df604){const _0x1ea12f=_0x5de57a;logger[_0x1ea12f('0x1')](JSON[_0x1ea12f('0xb')](_0x3df604));});});},Migration[_0x5c9b96('0x1d')][_0x5c9b96('0x10')]=function(_0x468248,_0x172d04){const _0x50d17c=_0x5c9b96,_0x15d83b=this;this[_0x50d17c('0xe')]['enqueue'](function(){const _0x506e15=_0x50d17c;return _0x15d83b[_0x506e15('0x18')]['removeIndex'](_0x468248,_0x172d04)['then'](function(){const _0x2eaf14=_0x506e15;logger[_0x2eaf14('0x1')]('removeIndex\x20%s\x20%s',_0x468248,_0x172d04);})[_0x506e15('0x14')](function(_0x10f459){const _0x1866a8=_0x506e15;logger[_0x1866a8('0x1')](JSON[_0x1866a8('0xb')](_0x10f459));});});},Migration[_0x5c9b96('0x1d')][_0x5c9b96('0xd')]=function(_0x1a07be){const _0x4da04b=_0x5c9b96,_0x35c651=this;this[_0x4da04b('0xe')][_0x4da04b('0x7')](function(){const _0x55537b=_0x4da04b;return _0x35c651[_0x55537b('0x18')][_0x55537b('0x17')][_0x55537b('0xd')](_0x1a07be)[_0x55537b('0x3')](function(){const _0x31eea5=_0x55537b;logger['info'](_0x31eea5('0x1a'),_0x1a07be);})['catch'](function(_0x47d505){const _0x1d77d0=_0x55537b;logger[_0x1d77d0('0x1')](JSON[_0x1d77d0('0xb')](_0x47d505));});});},Migration[_0x5c9b96('0x1d')][_0x5c9b96('0x12')]=function(_0x41fd42,_0x269e56){const _0x16a9e6=_0x5c9b96,_0x5e2663=this;this[_0x16a9e6('0xe')]['enqueue'](function(){const _0x5262b9=_0x16a9e6;return _0x5e2663[_0x5262b9('0x18')]['removeColumn'](_0x41fd42,_0x269e56)[_0x5262b9('0x3')](function(){const _0x31c329=_0x5262b9;logger[_0x31c329('0x1')](_0x31c329('0x6'),_0x269e56,_0x41fd42);})[_0x5262b9('0x14')](function(_0x31e60a){const _0x122e19=_0x5262b9;logger[_0x122e19('0x1')](util[_0x122e19('0x11')](_0x31e60a,{'showHidden':![],'depth':null}));});});},Migration[_0x5c9b96('0x1d')][_0x5c9b96('0xa')]=function(_0x4418f2,_0x576045,_0x142ec4){const _0x42ac4b=_0x5c9b96,_0x481460=this;this[_0x42ac4b('0xe')][_0x42ac4b('0x7')](function(){const _0x4564ef=_0x42ac4b;return _0x481460[_0x4564ef('0x18')][_0x4564ef('0xa')](_0x4418f2,_0x576045,_0x142ec4)['then'](function(){const _0x5de104=_0x4564ef;logger[_0x5de104('0x1')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x576045,_0x142ec4,_0x4418f2);})[_0x4564ef('0x14')](function(_0x1445ed){const _0x56cee4=_0x4564ef;logger[_0x56cee4('0x1')](util[_0x56cee4('0x11')](_0x1445ed,{'showHidden':![],'depth':null}));});});},Migration['prototype'][_0x5c9b96('0x8')]=function(_0x33a1d2){const _0x42fa72=_0x5c9b96;this[_0x42fa72('0xe')]['enqueue'](function(){return _0x33a1d2();});},module['exports']={'up':function(_0x532eeb){return new Promise(function(_0xb2b059){const _0x1e34f1=a1000_0x47e3,_0x58cea2=new Migration(_0x532eeb);_0x58cea2[_0x1e34f1('0x8')](_0xb2b059);});},'down':function(){}};