93e299918a3f2615ac79d4286917efc5285591da
[motion-next.git] / server / migrations / 2.3.91.js
1 const a982_0xddc8=['util','renameColumn','report_call','catch','info','Removed\x20column\x20%s\x20from\x20%s','finally','prototype','addIndex','sequelize','then','dropTable','inspect','query','sequence','changeColumn','table\x20dropped\x20%s','addColumn','sipcallid','tail','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','stringify','queryInterface','final','removeIndex\x20%s\x20%s','Added\x20column\x20%s\x20to\x20%s','removeIndex','query\x20%s','removeColumn','Changed\x20column\x20%s\x20in\x20table\x20%s','exports','enqueue'];(function(_0x8e2d3f,_0xddc850){const _0x366747=function(_0x580c2a){while(--_0x580c2a){_0x8e2d3f['push'](_0x8e2d3f['shift']());}};_0x366747(++_0xddc850);}(a982_0xddc8,0x159));const a982_0x3667=function(_0x8e2d3f,_0xddc850){_0x8e2d3f=_0x8e2d3f-0x0;let _0x366747=a982_0xddc8[_0x8e2d3f];return _0x366747;};const _0x555f2a=a982_0x3667;'use strict';const util=require(_0x555f2a('0x7')),logger=require('../config/logger')('migration'),Sequence=function(){};Sequence[_0x555f2a('0xe')][_0x555f2a('0x6')]=function(_0x580c2a){const _0x386080=_0x555f2a;this[_0x386080('0x1a')]=this['tail']?this[_0x386080('0x1a')][_0x386080('0xd')](_0x580c2a):_0x580c2a();};const Migration=function(_0x7c999f){const _0x5b6c2c=_0x555f2a;this[_0x5b6c2c('0x1d')]=_0x7c999f,this[_0x5b6c2c('0x15')]=new Sequence();};Migration['prototype'][_0x555f2a('0x16')]=function(_0x343e23,_0x41010b,_0xada6d3){const _0x78fed3=_0x555f2a,_0x2efb8a=this;this['sequence'][_0x78fed3('0x6')](function(){const _0x29ed92=_0x78fed3;return _0x2efb8a[_0x29ed92('0x1d')][_0x29ed92('0x16')](_0x343e23,_0x41010b,_0xada6d3)[_0x29ed92('0x11')](function(){const _0x562c1a=_0x29ed92;logger[_0x562c1a('0xb')](_0x562c1a('0x4'),_0x41010b,_0x343e23);})[_0x29ed92('0xa')](function(_0x20211c){const _0x16330a=_0x29ed92;logger['info'](JSON[_0x16330a('0x1c')](_0x20211c));});});},Migration['prototype'][_0x555f2a('0x18')]=function(_0x1cfdf8,_0xbb1686,_0xa54060){const _0x3fe1a6=_0x555f2a,_0x399f77=this;this['sequence'][_0x3fe1a6('0x6')](function(){const _0x422f90=_0x3fe1a6;return _0x399f77['queryInterface'][_0x422f90('0x18')](_0x1cfdf8,_0xbb1686,_0xa54060)['then'](function(){const _0x17d536=_0x422f90;logger['info'](_0x17d536('0x0'),_0xbb1686,_0x1cfdf8);})['catch'](function(_0x5365fc){const _0x56d8e8=_0x422f90;logger[_0x56d8e8('0xb')](JSON[_0x56d8e8('0x1c')](_0x5365fc));});});},Migration['prototype']['dropTable']=function(_0x531735){const _0x554f74=_0x555f2a,_0xcc70ba=this;this[_0x554f74('0x15')][_0x554f74('0x6')](function(){const _0x477802=_0x554f74;return _0xcc70ba[_0x477802('0x1d')][_0x477802('0x12')](_0x531735,{'force':!![]})[_0x477802('0x11')](function(){const _0x2a79f2=_0x477802;logger[_0x2a79f2('0xb')](_0x2a79f2('0x17'),_0x531735);})['catch'](function(_0x1623bd){const _0x515be4=_0x477802;logger[_0x515be4('0xb')](JSON[_0x515be4('0x1c')](_0x1623bd));});});},Migration[_0x555f2a('0xe')][_0x555f2a('0xf')]=function(_0x1ef6ff,_0x238cdd,_0x302353){const _0x366447=_0x555f2a,_0x132e1c=this;this[_0x366447('0x15')][_0x366447('0x6')](function(){const _0x5635d1=_0x366447;return _0x132e1c[_0x5635d1('0x1d')][_0x5635d1('0xf')](_0x1ef6ff,_0x238cdd,{'indexName':_0x302353})[_0x5635d1('0x11')](function(){const _0x27860e=_0x5635d1;logger[_0x27860e('0xb')]('addIndex\x20%s\x20%s\x20%s',_0x1ef6ff,_0x238cdd['join'](','),_0x302353);})[_0x5635d1('0xa')](function(_0x563ab2){const _0x15ef45=_0x5635d1;logger[_0x15ef45('0xb')](JSON[_0x15ef45('0x1c')](_0x563ab2));});});},Migration[_0x555f2a('0xe')][_0x555f2a('0x1')]=function(_0x5358f3,_0x5ee569){const _0x3c451b=this;this['sequence']['enqueue'](function(){const _0x5753e0=a982_0x3667;return _0x3c451b[_0x5753e0('0x1d')]['removeIndex'](_0x5358f3,_0x5ee569)[_0x5753e0('0x11')](function(){const _0x5034b2=_0x5753e0;logger[_0x5034b2('0xb')](_0x5034b2('0x1f'),_0x5358f3,_0x5ee569);})[_0x5753e0('0xa')](function(_0x347af7){const _0x3bbf4f=_0x5753e0;logger[_0x3bbf4f('0xb')](JSON[_0x3bbf4f('0x1c')](_0x347af7));});});},Migration[_0x555f2a('0xe')][_0x555f2a('0x14')]=function(_0x367269){const _0x3767ef=_0x555f2a,_0x5e0cf9=this;this['sequence'][_0x3767ef('0x6')](function(){const _0x38f242=_0x3767ef;return _0x5e0cf9[_0x38f242('0x1d')][_0x38f242('0x10')][_0x38f242('0x14')](_0x367269)[_0x38f242('0x11')](function(){const _0x449fd7=_0x38f242;logger[_0x449fd7('0xb')](_0x449fd7('0x2'),_0x367269);})['catch'](function(_0x35148e){const _0xc3b27=_0x38f242;logger['info'](JSON[_0xc3b27('0x1c')](_0x35148e));});});},Migration[_0x555f2a('0xe')][_0x555f2a('0x3')]=function(_0x52f7ac,_0x1ac0cf){const _0x166e20=this;this['sequence']['enqueue'](function(){const _0x5ba340=a982_0x3667;return _0x166e20[_0x5ba340('0x1d')]['removeColumn'](_0x52f7ac,_0x1ac0cf)[_0x5ba340('0x11')](function(){const _0x3a4b36=_0x5ba340;logger[_0x3a4b36('0xb')](_0x3a4b36('0xc'),_0x1ac0cf,_0x52f7ac);})['catch'](function(_0x950f4c){const _0x5a5564=_0x5ba340;logger[_0x5a5564('0xb')](util[_0x5a5564('0x13')](_0x950f4c,{'showHidden':![],'depth':null}));});});},Migration[_0x555f2a('0xe')][_0x555f2a('0x8')]=function(_0x4b41e3,_0x17974d,_0x4bbdbc){const _0x14ff8a=_0x555f2a,_0x87daa1=this;this[_0x14ff8a('0x15')][_0x14ff8a('0x6')](function(){const _0x3df2b8=_0x14ff8a;return _0x87daa1[_0x3df2b8('0x1d')]['renameColumn'](_0x4b41e3,_0x17974d,_0x4bbdbc)[_0x3df2b8('0x11')](function(){const _0x1350c7=_0x3df2b8;logger['info'](_0x1350c7('0x1b'),_0x17974d,_0x4bbdbc,_0x4b41e3);})[_0x3df2b8('0xa')](function(_0x496da5){const _0x4a1928=_0x3df2b8;logger[_0x4a1928('0xb')](util['inspect'](_0x496da5,{'showHidden':![],'depth':null}));});});},Migration[_0x555f2a('0xe')][_0x555f2a('0x1e')]=function(_0x106d3a){const _0x555acd=_0x555f2a;this['sequence'][_0x555acd('0x6')](function(){return _0x106d3a();});},module[_0x555f2a('0x5')]={'up':function(_0x5a1405,_0x21e986){return new Promise(function(_0x2627ab){const _0x256675=a982_0x3667,_0xf54ebd=new Migration(_0x5a1405);_0xf54ebd[_0x256675('0x18')](_0x256675('0x9'),_0x256675('0x19'),{'type':_0x21e986['STRING']}),_0xf54ebd[_0x256675('0x1e')](_0x2627ab);});},'down':function(){}};