Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / migrations / 2.4.18.js
1 const a1001_0x334f=['Added\x20column\x20%s\x20to\x20%s','queryInterface','catch','query','removeIndex\x20%s\x20%s','indexName','../config/logger','Changed\x20column\x20%s\x20in\x20table\x20%s','addIndex','UPDATE\x20voice_queues\x20SET\x20leavewhenempty\x20=\x20\x22no\x22\x20WHERE\x20leavewhenempty\x20=\x20\x27\x27\x20or\x20leavewhenempty\x20IS\x20NULL','exports','finally','enqueue','removeIndex','indicesType','info','addIndex\x20%s\x20%s\x20%s\x20[%s]','query\x20%s','addColumn','UPDATE\x20voice_queues\x20SET\x20joinempty\x20=\x20\x22yes\x22\x20WHERE\x20joinempty\x20=\x20\x27\x27\x20or\x20joinempty\x20IS\x20NULL','migration','changeColumn','prototype','util','then','tail','sequence','dropTable','inspect','final','removeColumn','table\x20dropped\x20%s','stringify'];(function(_0x278d37,_0x334f72){const _0x157cc6=function(_0x225c3c){while(--_0x225c3c){_0x278d37['push'](_0x278d37['shift']());}};_0x157cc6(++_0x334f72);}(a1001_0x334f,0x10d));const a1001_0x157c=function(_0x278d37,_0x334f72){_0x278d37=_0x278d37-0x0;let _0x157cc6=a1001_0x334f[_0x278d37];return _0x157cc6;};const _0x387509=a1001_0x157c;'use strict';const util=require(_0x387509('0x12')),logger=require(_0x387509('0x1'))(_0x387509('0xf')),Sequence=function(){};Sequence['prototype'][_0x387509('0x7')]=function(_0x225c3c){const _0x34fb7e=_0x387509;this['tail']=this[_0x34fb7e('0x14')]?this[_0x34fb7e('0x14')][_0x34fb7e('0x6')](_0x225c3c):_0x225c3c();};const Migration=function(_0x9f2ec6){const _0x281933=_0x387509;this[_0x281933('0x1d')]=_0x9f2ec6,this['sequence']=new Sequence();};Migration[_0x387509('0x11')]['changeColumn']=function(_0x32b155,_0x5d951e,_0xfb2c0e){const _0x2423c3=_0x387509,_0x3c20e8=this;this[_0x2423c3('0x15')][_0x2423c3('0x7')](function(){const _0x550fa1=_0x2423c3;return _0x3c20e8[_0x550fa1('0x1d')][_0x550fa1('0x10')](_0x32b155,_0x5d951e,_0xfb2c0e)['then'](function(){const _0x291a67=_0x550fa1;logger[_0x291a67('0xa')](_0x291a67('0x2'),_0x5d951e,_0x32b155);})[_0x550fa1('0x1e')](function(_0x4ed12f){const _0x5bf3bf=_0x550fa1;logger['info'](JSON[_0x5bf3bf('0x1b')](_0x4ed12f));});});},Migration[_0x387509('0x11')]['addColumn']=function(_0x158a0a,_0x3d488e,_0x16c956){const _0x51a1a0=_0x387509,_0x5b7992=this;this[_0x51a1a0('0x15')]['enqueue'](function(){const _0x30559b=_0x51a1a0;return _0x5b7992['queryInterface'][_0x30559b('0xd')](_0x158a0a,_0x3d488e,_0x16c956)[_0x30559b('0x13')](function(){const _0x133e27=_0x30559b;logger[_0x133e27('0xa')](_0x133e27('0x1c'),_0x3d488e,_0x158a0a);})['catch'](function(_0x4c2d57){const _0x1aa19f=_0x30559b;logger[_0x1aa19f('0xa')](JSON[_0x1aa19f('0x1b')](_0x4c2d57));});});},Migration[_0x387509('0x11')][_0x387509('0x16')]=function(_0x438a59){const _0x543295=_0x387509,_0x3f498e=this;this['sequence'][_0x543295('0x7')](function(){const _0x3da1df=_0x543295;return _0x3f498e[_0x3da1df('0x1d')][_0x3da1df('0x16')](_0x438a59,{'force':!![]})['then'](function(){const _0x73dba=_0x3da1df;logger['info'](_0x73dba('0x1a'),_0x438a59);})['catch'](function(_0xfede9e){const _0x357379=_0x3da1df;logger[_0x357379('0xa')](JSON[_0x357379('0x1b')](_0xfede9e));});});},Migration['prototype'][_0x387509('0x3')]=function(_0x9cc5ba,_0x1a362e,_0x16ab7c){const _0x1b707c=_0x387509,_0x38f31c=this;this[_0x1b707c('0x15')][_0x1b707c('0x7')](function(){const _0x4f8ed4=_0x1b707c;return _0x38f31c[_0x4f8ed4('0x1d')]['addIndex'](_0x9cc5ba,_0x1a362e,{'indexName':_0x16ab7c[_0x4f8ed4('0x0')],'indicesType':_0x16ab7c[_0x4f8ed4('0x9')]})[_0x4f8ed4('0x13')](function(){const _0xd337d0=_0x4f8ed4;logger['info'](_0xd337d0('0xb'),_0x9cc5ba,_0x1a362e['join'](','),_0x16ab7c['indexName'],_0x16ab7c['indicesType']);})[_0x4f8ed4('0x1e')](function(_0x262e54){logger['info'](JSON['stringify'](_0x262e54));});});},Migration[_0x387509('0x11')][_0x387509('0x8')]=function(_0x5bc83d,_0x732885){const _0xebac5b=_0x387509,_0x452c72=this;this[_0xebac5b('0x15')][_0xebac5b('0x7')](function(){const _0x33db85=_0xebac5b;return _0x452c72['queryInterface']['removeIndex'](_0x5bc83d,_0x732885)['then'](function(){const _0x530bbf=a1001_0x157c;logger['info'](_0x530bbf('0x20'),_0x5bc83d,_0x732885);})[_0x33db85('0x1e')](function(_0x2828ae){const _0x7f5dab=_0x33db85;logger[_0x7f5dab('0xa')](JSON[_0x7f5dab('0x1b')](_0x2828ae));});});},Migration[_0x387509('0x11')][_0x387509('0x1f')]=function(_0x5d1ee6){const _0x1c8438=_0x387509,_0x506b72=this;this[_0x1c8438('0x15')]['enqueue'](function(){const _0x5d0d23=_0x1c8438;return _0x506b72['queryInterface']['sequelize'][_0x5d0d23('0x1f')](_0x5d1ee6)['then'](function(){const _0x386833=_0x5d0d23;logger[_0x386833('0xa')](_0x386833('0xc'),_0x5d1ee6);})[_0x5d0d23('0x1e')](function(_0x28b175){const _0x5694a0=_0x5d0d23;logger[_0x5694a0('0xa')](JSON[_0x5694a0('0x1b')](_0x28b175));});});},Migration[_0x387509('0x11')][_0x387509('0x19')]=function(_0x217026,_0xec9780){const _0xc11b24=_0x387509,_0x36a6ff=this;this[_0xc11b24('0x15')][_0xc11b24('0x7')](function(){const _0x54a18e=_0xc11b24;return _0x36a6ff[_0x54a18e('0x1d')][_0x54a18e('0x19')](_0x217026,_0xec9780)[_0x54a18e('0x13')](function(){const _0x3c05cd=_0x54a18e;logger[_0x3c05cd('0xa')]('Removed\x20column\x20%s\x20from\x20%s',_0xec9780,_0x217026);})['catch'](function(_0x38c15d){logger['info'](util['inspect'](_0x38c15d,{'showHidden':![],'depth':null}));});});},Migration[_0x387509('0x11')]['renameColumn']=function(_0x317dd7,_0x49d29f,_0x34603a){const _0x2d2f4d=_0x387509,_0x1fa071=this;this[_0x2d2f4d('0x15')]['enqueue'](function(){const _0x1c51a4=_0x2d2f4d;return _0x1fa071['queryInterface']['renameColumn'](_0x317dd7,_0x49d29f,_0x34603a)[_0x1c51a4('0x13')](function(){const _0x264fd9=_0x1c51a4;logger[_0x264fd9('0xa')]('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x49d29f,_0x34603a,_0x317dd7);})['catch'](function(_0x2c3367){const _0x142b07=_0x1c51a4;logger[_0x142b07('0xa')](util[_0x142b07('0x17')](_0x2c3367,{'showHidden':![],'depth':null}));});});},Migration[_0x387509('0x11')]['final']=function(_0x1f3da7){this['sequence']['enqueue'](function(){return _0x1f3da7();});},module[_0x387509('0x5')]={'up':function(_0x59175c){return new Promise(function(_0x2aa950){const _0x239444=a1001_0x157c,_0x2ff384=new Migration(_0x59175c);_0x2ff384[_0x239444('0x1f')](_0x239444('0xe')),_0x2ff384['query'](_0x239444('0x4')),_0x2ff384[_0x239444('0x18')](_0x2aa950);});},'down':function(){}};