f3ee5ffec79383766f3d0f3c6366a6424419639c
[motion-next.git] / server / migrations / 2.0.30.js
1 const a909_0x5d58=['table\x20dropped\x20%s','INTEGER','enqueue','info','stringify','query','sequence','tail','dialQueueTimeout','join','query\x20%s','migration','user_has_chat_interactions','dropTable','exports','user_has_chat_rooms','prototype','queryInterface','finally','chat_queues','team_has_chat_queues','chat_websites','changeColumn','then','final','chat_visitors','Changed\x20column\x20%s\x20in\x20table\x20%s','chat_interactions','addColumn','chat_enquiries','addIndex','voice_queues','user_has_chat_queues','Added\x20column\x20%s\x20to\x20%s','catch'];(function(_0x27b6e3,_0x5d58fa){const _0x50e4be=function(_0x508a7a){while(--_0x508a7a){_0x27b6e3['push'](_0x27b6e3['shift']());}};_0x50e4be(++_0x5d58fa);}(a909_0x5d58,0x1df));const a909_0x50e4=function(_0x27b6e3,_0x5d58fa){_0x27b6e3=_0x27b6e3-0x0;let _0x50e4be=a909_0x5d58[_0x27b6e3];return _0x50e4be;};const _0x4195a5=a909_0x50e4;'use strict';const logger=require('../config/logger')(_0x4195a5('0x16')),Sequence=function(){};Sequence[_0x4195a5('0x1b')][_0x4195a5('0xd')]=function(_0x508a7a){const _0x3e59de=_0x4195a5;this[_0x3e59de('0x12')]=this[_0x3e59de('0x12')]?this['tail'][_0x3e59de('0x1d')](_0x508a7a):_0x508a7a();};const Migration=function(_0xee2c6a){const _0x2ab738=_0x4195a5;this[_0x2ab738('0x1c')]=_0xee2c6a,this['sequence']=new Sequence();};Migration['prototype'][_0x4195a5('0x21')]=function(_0x6ca241,_0x1109b2,_0x3d98a9){const _0x4d6e9f=_0x4195a5,_0x75f361=this;this[_0x4d6e9f('0x11')][_0x4d6e9f('0xd')](function(){const _0x106f3a=_0x4d6e9f;return _0x75f361['queryInterface'][_0x106f3a('0x21')](_0x6ca241,_0x1109b2,_0x3d98a9)[_0x106f3a('0x22')](function(){const _0x38812d=_0x106f3a;logger[_0x38812d('0xe')](_0x38812d('0x2'),_0x1109b2,_0x6ca241);})[_0x106f3a('0xa')](function(_0x2a058c){const _0x1e2338=_0x106f3a;logger[_0x1e2338('0xe')](JSON[_0x1e2338('0xf')](_0x2a058c));});});},Migration['prototype'][_0x4195a5('0x4')]=function(_0x44b232,_0x57b120,_0x28c82d){const _0x273bc7=_0x4195a5,_0x41fb7d=this;this['sequence'][_0x273bc7('0xd')](function(){const _0x5131d9=_0x273bc7;return _0x41fb7d[_0x5131d9('0x1c')][_0x5131d9('0x4')](_0x44b232,_0x57b120,_0x28c82d)[_0x5131d9('0x22')](function(){const _0x5cd2b0=_0x5131d9;logger['info'](_0x5cd2b0('0x9'),_0x57b120,_0x44b232);})[_0x5131d9('0xa')](function(_0x34709a){const _0x114c74=_0x5131d9;logger[_0x114c74('0xe')](JSON[_0x114c74('0xf')](_0x34709a));});});},Migration[_0x4195a5('0x1b')][_0x4195a5('0x18')]=function(_0x468f6f){const _0xa36989=_0x4195a5,_0x1c6eb5=this;this[_0xa36989('0x11')][_0xa36989('0xd')](function(){const _0x5c1ccf=_0xa36989;return _0x1c6eb5[_0x5c1ccf('0x1c')][_0x5c1ccf('0x18')](_0x468f6f,{'force':!![]})[_0x5c1ccf('0x22')](function(){const _0x1321bf=_0x5c1ccf;logger[_0x1321bf('0xe')](_0x1321bf('0xb'),_0x468f6f);})[_0x5c1ccf('0xa')](function(_0x392c2b){const _0x24e397=_0x5c1ccf;logger[_0x24e397('0xe')](JSON['stringify'](_0x392c2b));});});},Migration[_0x4195a5('0x1b')][_0x4195a5('0x6')]=function(_0x37298f,_0x2c4f6b,_0x1f0396){const _0x897651=_0x4195a5,_0x5922b5=this;this[_0x897651('0x11')][_0x897651('0xd')](function(){const _0x1203a2=_0x897651;return _0x5922b5[_0x1203a2('0x1c')][_0x1203a2('0x6')](_0x37298f,_0x2c4f6b,{'indexName':_0x1f0396})[_0x1203a2('0x22')](function(){const _0x201836=_0x1203a2;logger[_0x201836('0xe')]('addIndex\x20%s\x20%s\x20%s',_0x37298f,_0x2c4f6b[_0x201836('0x14')](','),_0x1f0396);})[_0x1203a2('0xa')](function(_0x50458e){const _0x4004f0=_0x1203a2;logger[_0x4004f0('0xe')](JSON[_0x4004f0('0xf')](_0x50458e));});});},Migration[_0x4195a5('0x1b')]['query']=function(_0x1a0ca7){const _0x2b4bef=_0x4195a5,_0x5bc290=this;this[_0x2b4bef('0x11')][_0x2b4bef('0xd')](function(){const _0x49b358=_0x2b4bef;return _0x5bc290['queryInterface']['sequelize'][_0x49b358('0x10')](_0x1a0ca7)[_0x49b358('0x22')](function(){const _0x8ed4df=_0x49b358;logger['info'](_0x8ed4df('0x15'),_0x1a0ca7);})[_0x49b358('0xa')](function(_0x44c5d6){const _0x4dbfe6=_0x49b358;logger[_0x4dbfe6('0xe')](JSON[_0x4dbfe6('0xf')](_0x44c5d6));});});},Migration[_0x4195a5('0x1b')][_0x4195a5('0x0')]=function(_0x254818){const _0x39519e=_0x4195a5;this[_0x39519e('0x11')][_0x39519e('0xd')](function(){return _0x254818();});},module[_0x4195a5('0x19')]={'up':function(_0x2bc7a7,_0x2d33d7){return new Promise(function(_0x3afa7e){const _0x501c73=a909_0x50e4,_0x5d1dcb=new Migration(_0x2bc7a7);_0x5d1dcb['dropTable'](_0x501c73('0x1a')),_0x5d1dcb[_0x501c73('0x18')](_0x501c73('0x5')),_0x5d1dcb[_0x501c73('0x18')]('chat_messages'),_0x5d1dcb[_0x501c73('0x18')]('chat_proactive_actions'),_0x5d1dcb[_0x501c73('0x18')]('chat_dispositions'),_0x5d1dcb[_0x501c73('0x18')]('chat_applications'),_0x5d1dcb[_0x501c73('0x18')](_0x501c73('0x17')),_0x5d1dcb[_0x501c73('0x18')](_0x501c73('0x3')),_0x5d1dcb[_0x501c73('0x18')](_0x501c73('0x1f')),_0x5d1dcb[_0x501c73('0x18')](_0x501c73('0x8')),_0x5d1dcb['dropTable'](_0x501c73('0x1e')),_0x5d1dcb[_0x501c73('0x18')](_0x501c73('0x1')),_0x5d1dcb['dropTable']('chat_websites_fields'),_0x5d1dcb['dropTable'](_0x501c73('0x20')),_0x5d1dcb[_0x501c73('0x21')](_0x501c73('0x7'),_0x501c73('0x13'),{'type':_0x2d33d7[_0x501c73('0xc')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)'}),_0x5d1dcb['final'](_0x3afa7e);});},'down':function(){}};