febb49bab2a82f43846bcf6d858bbb30b62588aa
[motion-next.git] / server / migrations / 2.3.3.js
1 const a976_0x585b=['tail','addColumn','fax_applications','TEXT','info','catch','stringify','chat_applications','openchannel_applications','Added\x20column\x20%s\x20to\x20%s','enqueue','sequelize','appdata','ALTER\x20TABLE\x20tools_canned_answers\x20CONVERT\x20TO\x20CHARACTER\x20SET\x20utf8mb4\x20COLLATE\x20utf8mb4_unicode_ci;','addIndex','Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s','prototype','Removed\x20column\x20%s\x20from\x20%s','removeColumn','sequence','addIndex\x20%s\x20%s\x20%s','queryInterface','../config/logger','removeIndex','then','sms_applications','changeColumn','query\x20%s','join','dropTable','Changed\x20column\x20%s\x20in\x20table\x20%s','final','renameColumn','query','finally'];(function(_0x396563,_0x585bc2){const _0x38e921=function(_0x1543cd){while(--_0x1543cd){_0x396563['push'](_0x396563['shift']());}};_0x38e921(++_0x585bc2);}(a976_0x585b,0xdf));const a976_0x38e9=function(_0x396563,_0x585bc2){_0x396563=_0x396563-0x0;let _0x38e921=a976_0x585b[_0x396563];return _0x38e921;};const _0x2ed982=a976_0x38e9;'use strict';const util=require('util'),logger=require(_0x2ed982('0x9'))('migration'),Sequence=function(){};Sequence[_0x2ed982('0x3')]['enqueue']=function(_0x1543cd){const _0x1a7fc1=_0x2ed982;this[_0x1a7fc1('0x16')]=this[_0x1a7fc1('0x16')]?this[_0x1a7fc1('0x16')][_0x1a7fc1('0x15')](_0x1543cd):_0x1543cd();};const Migration=function(_0x17e8d3){const _0xb68d6b=_0x2ed982;this['queryInterface']=_0x17e8d3,this[_0xb68d6b('0x6')]=new Sequence();};Migration[_0x2ed982('0x3')][_0x2ed982('0xd')]=function(_0x12ae2a,_0x2e3ac6,_0x259c4a){const _0x157640=_0x2ed982,_0x1341d5=this;this['sequence'][_0x157640('0x20')](function(){const _0x5d763c=_0x157640;return _0x1341d5['queryInterface'][_0x5d763c('0xd')](_0x12ae2a,_0x2e3ac6,_0x259c4a)[_0x5d763c('0xb')](function(){const _0xc3012b=_0x5d763c;logger[_0xc3012b('0x1a')](_0xc3012b('0x11'),_0x2e3ac6,_0x12ae2a);})[_0x5d763c('0x1b')](function(_0x5c28f1){const _0x45d981=_0x5d763c;logger['info'](JSON[_0x45d981('0x1c')](_0x5c28f1));});});},Migration[_0x2ed982('0x3')][_0x2ed982('0x17')]=function(_0x569296,_0x2e96f7,_0x5d908c){const _0x2c7f49=_0x2ed982,_0x1c55d6=this;this['sequence'][_0x2c7f49('0x20')](function(){const _0x23b2d3=_0x2c7f49;return _0x1c55d6['queryInterface'][_0x23b2d3('0x17')](_0x569296,_0x2e96f7,_0x5d908c)[_0x23b2d3('0xb')](function(){const _0x508b18=_0x23b2d3;logger[_0x508b18('0x1a')](_0x508b18('0x1f'),_0x2e96f7,_0x569296);})['catch'](function(_0x5f2745){const _0xd5bfe2=_0x23b2d3;logger['info'](JSON[_0xd5bfe2('0x1c')](_0x5f2745));});});},Migration['prototype'][_0x2ed982('0x10')]=function(_0x29d268){const _0xac3541=_0x2ed982,_0x201d4a=this;this[_0xac3541('0x6')][_0xac3541('0x20')](function(){const _0x13dd66=_0xac3541;return _0x201d4a[_0x13dd66('0x8')][_0x13dd66('0x10')](_0x29d268,{'force':!![]})['then'](function(){const _0x1b0b7b=_0x13dd66;logger[_0x1b0b7b('0x1a')]('table\x20dropped\x20%s',_0x29d268);})['catch'](function(_0x13fd40){const _0xef16c=_0x13dd66;logger[_0xef16c('0x1a')](JSON[_0xef16c('0x1c')](_0x13fd40));});});},Migration[_0x2ed982('0x3')][_0x2ed982('0x1')]=function(_0x2a8b87,_0x486144,_0x488f13){const _0x3621fd=this;this['sequence']['enqueue'](function(){const _0xe3d516=a976_0x38e9;return _0x3621fd['queryInterface'][_0xe3d516('0x1')](_0x2a8b87,_0x486144,{'indexName':_0x488f13})[_0xe3d516('0xb')](function(){const _0x4f5a2a=_0xe3d516;logger['info'](_0x4f5a2a('0x7'),_0x2a8b87,_0x486144[_0x4f5a2a('0xf')](','),_0x488f13);})['catch'](function(_0x49b4f8){const _0x214f5f=_0xe3d516;logger['info'](JSON[_0x214f5f('0x1c')](_0x49b4f8));});});},Migration[_0x2ed982('0x3')][_0x2ed982('0xa')]=function(_0x20817e,_0x4bc063){const _0x2d4aec=_0x2ed982,_0x49e511=this;this[_0x2d4aec('0x6')][_0x2d4aec('0x20')](function(){const _0x5e8e53=_0x2d4aec;return _0x49e511[_0x5e8e53('0x8')][_0x5e8e53('0xa')](_0x20817e,_0x4bc063)[_0x5e8e53('0xb')](function(){const _0x4ac314=_0x5e8e53;logger[_0x4ac314('0x1a')]('removeIndex\x20%s\x20%s',_0x20817e,_0x4bc063);})[_0x5e8e53('0x1b')](function(_0x37dc2f){const _0x7a1e07=_0x5e8e53;logger[_0x7a1e07('0x1a')](JSON[_0x7a1e07('0x1c')](_0x37dc2f));});});},Migration['prototype'][_0x2ed982('0x14')]=function(_0x24d044){const _0x5f696d=_0x2ed982,_0x4ab019=this;this[_0x5f696d('0x6')][_0x5f696d('0x20')](function(){const _0x4f3ed5=_0x5f696d;return _0x4ab019[_0x4f3ed5('0x8')][_0x4f3ed5('0x21')][_0x4f3ed5('0x14')](_0x24d044)[_0x4f3ed5('0xb')](function(){const _0x3de490=_0x4f3ed5;logger['info'](_0x3de490('0xe'),_0x24d044);})[_0x4f3ed5('0x1b')](function(_0xd15762){const _0x2bed99=_0x4f3ed5;logger[_0x2bed99('0x1a')](JSON[_0x2bed99('0x1c')](_0xd15762));});});},Migration[_0x2ed982('0x3')][_0x2ed982('0x5')]=function(_0x391a79,_0x57bcc8){const _0x1d7caa=_0x2ed982,_0x4c4182=this;this[_0x1d7caa('0x6')][_0x1d7caa('0x20')](function(){const _0x50926b=_0x1d7caa;return _0x4c4182[_0x50926b('0x8')][_0x50926b('0x5')](_0x391a79,_0x57bcc8)[_0x50926b('0xb')](function(){const _0x1aa596=_0x50926b;logger['info'](_0x1aa596('0x4'),_0x57bcc8,_0x391a79);})[_0x50926b('0x1b')](function(_0x50b2b7){const _0x3bc609=_0x50926b;logger[_0x3bc609('0x1a')](util['inspect'](_0x50b2b7,{'showHidden':![],'depth':null}));});});},Migration[_0x2ed982('0x3')][_0x2ed982('0x13')]=function(_0x314dc2,_0x4df082,_0x271d65){const _0x39b56b=_0x2ed982,_0xb90e93=this;this[_0x39b56b('0x6')]['enqueue'](function(){const _0x2613cf=_0x39b56b;return _0xb90e93['queryInterface'][_0x2613cf('0x13')](_0x314dc2,_0x4df082,_0x271d65)[_0x2613cf('0xb')](function(){const _0x2885bc=_0x2613cf;logger['info'](_0x2885bc('0x2'),_0x4df082,_0x271d65,_0x314dc2);})['catch'](function(_0x31e9d1){logger['info'](util['inspect'](_0x31e9d1,{'showHidden':![],'depth':null}));});});},Migration[_0x2ed982('0x3')][_0x2ed982('0x12')]=function(_0x4c11a9){const _0x38efa8=_0x2ed982;this['sequence'][_0x38efa8('0x20')](function(){return _0x4c11a9();});},module['exports']={'up':function(_0x436bd2,_0x462df6){return new Promise(function(_0x1e25c6){const _0x192fa8=a976_0x38e9,_0x3c1f71=new Migration(_0x436bd2);_0x3c1f71[_0x192fa8('0x14')](_0x192fa8('0x0')),_0x3c1f71[_0x192fa8('0xd')](_0x192fa8('0x1d'),_0x192fa8('0x22'),{'type':_0x462df6[_0x192fa8('0x19')]()}),_0x3c1f71[_0x192fa8('0xd')](_0x192fa8('0x18'),_0x192fa8('0x22'),{'type':_0x462df6[_0x192fa8('0x19')]()}),_0x3c1f71[_0x192fa8('0xd')]('mail_applications',_0x192fa8('0x22'),{'type':_0x462df6['TEXT']()}),_0x3c1f71[_0x192fa8('0xd')](_0x192fa8('0x1e'),_0x192fa8('0x22'),{'type':_0x462df6[_0x192fa8('0x19')]()}),_0x3c1f71[_0x192fa8('0xd')](_0x192fa8('0xc'),_0x192fa8('0x22'),{'type':_0x462df6['TEXT']()}),_0x3c1f71['final'](_0x1e25c6);});},'down':function(){}};