b1f4c66a9ed6cd49f51bb2a4efca8247814094e1
[motion-next.git] / server / migrations / 2.0.72.js
1 const a951_0x2f81=['removeIndex','sequence','sequelize','Added\x20column\x20%s\x20to\x20%s','enqueue','stringify','tail','../config/logger','leaveAt','query','finally','report_square','prototype','addIndex\x20%s\x20%s\x20%s','removeIndex\x20%s\x20%s','DELETE\x20FROM\x20user_has_voice_queues_rt\x20WHERE\x20UserId\x20NOT\x20IN\x20(SELECT\x20id\x20FROM\x20users\x20WHERE\x20role\x20=\x20\x27agent\x27)','uid_pname','addColumn','exports','info','project_name','changeColumn','dropTable','addIndex','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','queryInterface','migration','catch','inspect','final','then'];(function(_0x1c4a4b,_0x2f8192){const _0x475ec4=function(_0x3c4c9e){while(--_0x3c4c9e){_0x1c4a4b['push'](_0x1c4a4b['shift']());}};_0x475ec4(++_0x2f8192);}(a951_0x2f81,0x141));const a951_0x475e=function(_0x1c4a4b,_0x2f8192){_0x1c4a4b=_0x1c4a4b-0x0;let _0x475ec4=a951_0x2f81[_0x1c4a4b];return _0x475ec4;};const _0x1ceea3=a951_0x475e;'use strict';const util=require('util'),logger=require(_0x1ceea3('0x1b'))(_0x1ceea3('0xf')),Sequence=function(){};Sequence[_0x1ceea3('0x1')][_0x1ceea3('0x18')]=function(_0x3c4c9e){const _0x13cdba=_0x1ceea3;this[_0x13cdba('0x1a')]=this[_0x13cdba('0x1a')]?this[_0x13cdba('0x1a')][_0x13cdba('0x1e')](_0x3c4c9e):_0x3c4c9e();};const Migration=function(_0x5804a5){const _0x28d801=_0x1ceea3;this[_0x28d801('0xe')]=_0x5804a5,this[_0x28d801('0x15')]=new Sequence();};Migration[_0x1ceea3('0x1')][_0x1ceea3('0xa')]=function(_0x3c8533,_0x2ef830,_0x4df5e8){const _0xe7e0ff=_0x1ceea3,_0x2e247f=this;this[_0xe7e0ff('0x15')][_0xe7e0ff('0x18')](function(){const _0x13a95e=_0xe7e0ff;return _0x2e247f['queryInterface'][_0x13a95e('0xa')](_0x3c8533,_0x2ef830,_0x4df5e8)['then'](function(){const _0x5e83a6=_0x13a95e;logger[_0x5e83a6('0x8')]('Changed\x20column\x20%s\x20in\x20table\x20%s',_0x2ef830,_0x3c8533);})[_0x13a95e('0x10')](function(_0x1ed1a9){const _0x5c48e2=_0x13a95e;logger[_0x5c48e2('0x8')](JSON[_0x5c48e2('0x19')](_0x1ed1a9));});});},Migration[_0x1ceea3('0x1')][_0x1ceea3('0x6')]=function(_0xefb870,_0x47b5a5,_0xa9d05e){const _0x200f0b=_0x1ceea3,_0x3464bd=this;this[_0x200f0b('0x15')][_0x200f0b('0x18')](function(){const _0x503624=_0x200f0b;return _0x3464bd[_0x503624('0xe')][_0x503624('0x6')](_0xefb870,_0x47b5a5,_0xa9d05e)[_0x503624('0x13')](function(){const _0xad894d=_0x503624;logger[_0xad894d('0x8')](_0xad894d('0x17'),_0x47b5a5,_0xefb870);})[_0x503624('0x10')](function(_0xb94fce){const _0xebaad1=_0x503624;logger[_0xebaad1('0x8')](JSON[_0xebaad1('0x19')](_0xb94fce));});});},Migration['prototype'][_0x1ceea3('0xb')]=function(_0x175d83){const _0x3b6d31=_0x1ceea3,_0x5209a2=this;this[_0x3b6d31('0x15')][_0x3b6d31('0x18')](function(){const _0x22df37=_0x3b6d31;return _0x5209a2['queryInterface']['dropTable'](_0x175d83,{'force':!![]})[_0x22df37('0x13')](function(){const _0x5bdd5e=_0x22df37;logger[_0x5bdd5e('0x8')]('table\x20dropped\x20%s',_0x175d83);})['catch'](function(_0x3ae0f6){const _0xe230e0=_0x22df37;logger[_0xe230e0('0x8')](JSON[_0xe230e0('0x19')](_0x3ae0f6));});});},Migration[_0x1ceea3('0x1')][_0x1ceea3('0xc')]=function(_0x2d99f4,_0x3aa418,_0x5a8d56){const _0x1cdb2a=_0x1ceea3,_0x27e876=this;this[_0x1cdb2a('0x15')][_0x1cdb2a('0x18')](function(){const _0x285d85=_0x1cdb2a;return _0x27e876[_0x285d85('0xe')][_0x285d85('0xc')](_0x2d99f4,_0x3aa418,{'indexName':_0x5a8d56})[_0x285d85('0x13')](function(){const _0x1fb912=_0x285d85;logger[_0x1fb912('0x8')](_0x1fb912('0x2'),_0x2d99f4,_0x3aa418['join'](','),_0x5a8d56);})[_0x285d85('0x10')](function(_0x1f1406){const _0x4c1152=_0x285d85;logger[_0x4c1152('0x8')](JSON[_0x4c1152('0x19')](_0x1f1406));});});},Migration[_0x1ceea3('0x1')][_0x1ceea3('0x14')]=function(_0x2efdc8,_0x5d7690){const _0x10ccef=_0x1ceea3,_0x143c74=this;this[_0x10ccef('0x15')]['enqueue'](function(){const _0x5b56bc=_0x10ccef;return _0x143c74[_0x5b56bc('0xe')][_0x5b56bc('0x14')](_0x2efdc8,_0x5d7690)[_0x5b56bc('0x13')](function(){const _0x3e5a4d=_0x5b56bc;logger[_0x3e5a4d('0x8')](_0x3e5a4d('0x3'),_0x2efdc8,_0x5d7690);})[_0x5b56bc('0x10')](function(_0x4360b0){const _0x2112f2=_0x5b56bc;logger[_0x2112f2('0x8')](JSON[_0x2112f2('0x19')](_0x4360b0));});});},Migration[_0x1ceea3('0x1')][_0x1ceea3('0x1d')]=function(_0x32152a){const _0x1f8569=_0x1ceea3,_0x5148ad=this;this[_0x1f8569('0x15')][_0x1f8569('0x18')](function(){const _0x1a0039=_0x1f8569;return _0x5148ad['queryInterface'][_0x1a0039('0x16')][_0x1a0039('0x1d')](_0x32152a)[_0x1a0039('0x13')](function(){const _0x2b7c68=_0x1a0039;logger[_0x2b7c68('0x8')]('query\x20%s',_0x32152a);})[_0x1a0039('0x10')](function(_0x4908d6){const _0x3dc194=_0x1a0039;logger[_0x3dc194('0x8')](JSON['stringify'](_0x4908d6));});});},Migration[_0x1ceea3('0x1')]['removeColumn']=function(_0x395dfa,_0xc3be32){const _0x56e354=_0x1ceea3,_0x78ab81=this;this['sequence'][_0x56e354('0x18')](function(){const _0x439688=_0x56e354;return _0x78ab81[_0x439688('0xe')]['removeColumn'](_0x395dfa,_0xc3be32)[_0x439688('0x13')](function(){logger['info']('Removed\x20column\x20%s\x20from\x20%s',_0xc3be32,_0x395dfa);})[_0x439688('0x10')](function(_0x39645b){const _0x19b374=_0x439688;logger['info'](util[_0x19b374('0x11')](_0x39645b,{'showHidden':![],'depth':null}));});});},Migration[_0x1ceea3('0x1')]['renameColumn']=function(_0x28951f,_0x3eace4,_0x2e41c9){const _0x24a44d=this;this['sequence']['enqueue'](function(){const _0x144d37=a951_0x475e;return _0x24a44d['queryInterface']['renameColumn'](_0x28951f,_0x3eace4,_0x2e41c9)[_0x144d37('0x13')](function(){const _0x3e16b0=_0x144d37;logger[_0x3e16b0('0x8')](_0x3e16b0('0xd'),_0x3eace4,_0x2e41c9,_0x28951f);})[_0x144d37('0x10')](function(_0x4c3b37){const _0xf44fd6=_0x144d37;logger[_0xf44fd6('0x8')](util['inspect'](_0x4c3b37,{'showHidden':![],'depth':null}));});});},Migration[_0x1ceea3('0x1')][_0x1ceea3('0x12')]=function(_0x45f8a2){const _0x1ccc99=_0x1ceea3;this[_0x1ccc99('0x15')][_0x1ccc99('0x18')](function(){return _0x45f8a2();});},module[_0x1ceea3('0x7')]={'up':function(_0x4f7965){return new Promise(function(_0x190c4f){const _0x1b6fb7=a951_0x475e,_0x5d8183=new Migration(_0x4f7965);_0x5d8183[_0x1b6fb7('0x1d')](_0x1b6fb7('0x4')),_0x5d8183['addIndex'](_0x1b6fb7('0x0'),['uniqueid',_0x1b6fb7('0x9')],_0x1b6fb7('0x5')),_0x5d8183[_0x1b6fb7('0xc')](_0x1b6fb7('0x0'),['leaveAt'],_0x1b6fb7('0x1c')),_0x5d8183['final'](_0x190c4f);});},'down':function(){}};