98746c1dc26bcb1d32e1fb1877210dfc4d1d702e
[motion-next.git] / server / migrations / 2.0.61.js
1 const a940_0x4a2a=['join','inspect','../config/logger','info','then','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','Removed\x20column\x20%s\x20from\x20%s','addIndex\x20%s\x20%s\x20%s','exports','sequelize','sequence','catch','changeColumn','stringify','tail','Added\x20column\x20%s\x20to\x20%s','addIndex','query\x20%s','query','prototype','enqueue','removeColumn','finally','final','migration','addColumn','queryInterface','dropTable'];(function(_0x295a98,_0x4a2aed){const _0x329195=function(_0x300b26){while(--_0x300b26){_0x295a98['push'](_0x295a98['shift']());}};_0x329195(++_0x4a2aed);}(a940_0x4a2a,0x178));const a940_0x3291=function(_0x295a98,_0x4a2aed){_0x295a98=_0x295a98-0x0;let _0x329195=a940_0x4a2a[_0x295a98];return _0x329195;};const _0x331c4a=a940_0x3291;'use strict';const util=require('util'),logger=require(_0x331c4a('0x12'))(_0x331c4a('0xc')),Sequence=function(){};Sequence[_0x331c4a('0x7')][_0x331c4a('0x8')]=function(_0x300b26){const _0x5b6cf3=_0x331c4a;this[_0x5b6cf3('0x2')]=this[_0x5b6cf3('0x2')]?this['tail'][_0x5b6cf3('0xa')](_0x300b26):_0x300b26();};const Migration=function(_0x112950){const _0x4bca47=_0x331c4a;this[_0x4bca47('0xe')]=_0x112950,this['sequence']=new Sequence();};Migration[_0x331c4a('0x7')]['changeColumn']=function(_0x55b175,_0x18a58c,_0x197b2b){const _0x2201fb=_0x331c4a,_0x1dcc15=this;this[_0x2201fb('0x1a')][_0x2201fb('0x8')](function(){const _0x6b74f0=_0x2201fb;return _0x1dcc15[_0x6b74f0('0xe')][_0x6b74f0('0x0')](_0x55b175,_0x18a58c,_0x197b2b)[_0x6b74f0('0x14')](function(){const _0x47cd4c=_0x6b74f0;logger[_0x47cd4c('0x13')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x18a58c,_0x55b175);})[_0x6b74f0('0x1b')](function(_0x4fe59a){const _0x4b445a=_0x6b74f0;logger['info'](JSON[_0x4b445a('0x1')](_0x4fe59a));});});},Migration['prototype'][_0x331c4a('0xd')]=function(_0x5f148d,_0x2a912b,_0x586592){const _0x1dafdd=_0x331c4a,_0x426e1d=this;this[_0x1dafdd('0x1a')]['enqueue'](function(){const _0x57a430=_0x1dafdd;return _0x426e1d[_0x57a430('0xe')][_0x57a430('0xd')](_0x5f148d,_0x2a912b,_0x586592)[_0x57a430('0x14')](function(){const _0x339495=_0x57a430;logger[_0x339495('0x13')](_0x339495('0x3'),_0x2a912b,_0x5f148d);})[_0x57a430('0x1b')](function(_0x23fc90){const _0x45e411=_0x57a430;logger[_0x45e411('0x13')](JSON[_0x45e411('0x1')](_0x23fc90));});});},Migration['prototype'][_0x331c4a('0xf')]=function(_0x504469){const _0x55596d=_0x331c4a,_0x73d608=this;this[_0x55596d('0x1a')][_0x55596d('0x8')](function(){const _0x566d55=_0x55596d;return _0x73d608['queryInterface'][_0x566d55('0xf')](_0x504469,{'force':!![]})['then'](function(){const _0x125653=_0x566d55;logger[_0x125653('0x13')]('table\x20dropped\x20%s',_0x504469);})['catch'](function(_0x22c394){const _0x5d0ff2=_0x566d55;logger[_0x5d0ff2('0x13')](JSON['stringify'](_0x22c394));});});},Migration['prototype'][_0x331c4a('0x4')]=function(_0x12e52b,_0x4b7a47,_0x52b614){const _0x51dc77=_0x331c4a,_0x308efc=this;this[_0x51dc77('0x1a')][_0x51dc77('0x8')](function(){const _0xfe5e07=_0x51dc77;return _0x308efc[_0xfe5e07('0xe')][_0xfe5e07('0x4')](_0x12e52b,_0x4b7a47,{'indexName':_0x52b614})['then'](function(){const _0x2a7b33=_0xfe5e07;logger[_0x2a7b33('0x13')](_0x2a7b33('0x17'),_0x12e52b,_0x4b7a47[_0x2a7b33('0x10')](','),_0x52b614);})[_0xfe5e07('0x1b')](function(_0x3bd080){const _0xd3f3b5=_0xfe5e07;logger[_0xd3f3b5('0x13')](JSON[_0xd3f3b5('0x1')](_0x3bd080));});});},Migration['prototype'][_0x331c4a('0x6')]=function(_0x2d1446){const _0x2407ef=_0x331c4a,_0x3b7478=this;this[_0x2407ef('0x1a')]['enqueue'](function(){const _0x8cca4=_0x2407ef;return _0x3b7478[_0x8cca4('0xe')][_0x8cca4('0x19')]['query'](_0x2d1446)[_0x8cca4('0x14')](function(){const _0x49f929=_0x8cca4;logger[_0x49f929('0x13')](_0x49f929('0x5'),_0x2d1446);})['catch'](function(_0x201f6a){const _0x2c44e4=_0x8cca4;logger['info'](JSON[_0x2c44e4('0x1')](_0x201f6a));});});},Migration['prototype'][_0x331c4a('0x9')]=function(_0x1cd75e,_0x5184ab){const _0x1de991=_0x331c4a,_0x16eff0=this;this[_0x1de991('0x1a')]['enqueue'](function(){const _0x4f856a=_0x1de991;return _0x16eff0['queryInterface'][_0x4f856a('0x9')](_0x1cd75e,_0x5184ab)[_0x4f856a('0x14')](function(){const _0x1c3f45=_0x4f856a;logger['info'](_0x1c3f45('0x16'),_0x5184ab,_0x1cd75e);})[_0x4f856a('0x1b')](function(_0x5a666b){const _0x2d3d9d=_0x4f856a;logger[_0x2d3d9d('0x13')](util[_0x2d3d9d('0x11')](_0x5a666b,{'showHidden':![],'depth':null}));});});},Migration['prototype']['renameColumn']=function(_0x57be3a,_0x2b1d16,_0x5488fc){const _0x2f3d6e=_0x331c4a,_0x3e0cc1=this;this[_0x2f3d6e('0x1a')]['enqueue'](function(){const _0xffc54b=_0x2f3d6e;return _0x3e0cc1[_0xffc54b('0xe')]['renameColumn'](_0x57be3a,_0x2b1d16,_0x5488fc)[_0xffc54b('0x14')](function(){const _0x4331ff=_0xffc54b;logger['info'](_0x4331ff('0x15'),_0x2b1d16,_0x5488fc,_0x57be3a);})['catch'](function(_0x1b2314){const _0x31a5ca=_0xffc54b;logger['info'](util[_0x31a5ca('0x11')](_0x1b2314,{'showHidden':![],'depth':null}));});});},Migration[_0x331c4a('0x7')]['final']=function(_0x3585ae){const _0x4f8216=_0x331c4a;this[_0x4f8216('0x1a')][_0x4f8216('0x8')](function(){return _0x3585ae();});},module[_0x331c4a('0x18')]={'up':function(_0xe15d35){return new Promise(function(_0xe47763){const _0x13fb25=a940_0x3291,_0x54582b=new Migration(_0xe15d35);_0x54582b[_0x13fb25('0xb')](_0xe47763);});},'down':function(){}};