Built motion from commit a9fb64cc6defd8fb3a5cc199221f878e91c0e969. Version 3.0.0...
[motion-next.git] / server / migrations / 2.0.30.js
1 const a909_0x20df=['user_has_chat_interactions','sequence','join','user_has_chat_queues','enqueue','addColumn','Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','final','chat_dispositions','sequelize','changeColumn','chat_enquiries','dropTable','user_has_chat_rooms','table\x20dropped\x20%s','chat_websites','dialQueueTimeout','INTEGER','catch','query\x20%s','queryInterface','query','info','exports','chat_visitors','prototype','addIndex','chat_messages','stringify','finally','chat_applications','Changed\x20column\x20%s\x20in\x20table\x20%s','then','migration','tail'];(function(_0x2122d3,_0x20df78){const _0x7b16ce=function(_0x30bafa){while(--_0x30bafa){_0x2122d3['push'](_0x2122d3['shift']());}};_0x7b16ce(++_0x20df78);}(a909_0x20df,0x90));const a909_0x7b16=function(_0x2122d3,_0x20df78){_0x2122d3=_0x2122d3-0x0;let _0x7b16ce=a909_0x20df[_0x2122d3];return _0x7b16ce;};const _0x5915ec=a909_0x7b16;'use strict';const logger=require('../config/logger')(_0x5915ec('0x1d')),Sequence=function(){};Sequence[_0x5915ec('0x15')]['enqueue']=function(_0x30bafa){const _0x381513=_0x5915ec;this[_0x381513('0x1e')]=this[_0x381513('0x1e')]?this[_0x381513('0x1e')][_0x381513('0x19')](_0x30bafa):_0x30bafa();};const Migration=function(_0x3cab4d){const _0x2aebde=_0x5915ec;this[_0x2aebde('0x10')]=_0x3cab4d,this[_0x2aebde('0x20')]=new Sequence();};Migration[_0x5915ec('0x15')]['changeColumn']=function(_0x507641,_0x158165,_0x5bf1bf){const _0x579f14=_0x5915ec,_0x133325=this;this[_0x579f14('0x20')][_0x579f14('0x0')](function(){const _0x4ec704=_0x579f14;return _0x133325[_0x4ec704('0x10')]['changeColumn'](_0x507641,_0x158165,_0x5bf1bf)[_0x4ec704('0x1c')](function(){const _0x20cf70=_0x4ec704;logger[_0x20cf70('0x12')](_0x20cf70('0x1b'),_0x158165,_0x507641);})[_0x4ec704('0xe')](function(_0x59ac96){const _0x260be4=_0x4ec704;logger[_0x260be4('0x12')](JSON[_0x260be4('0x18')](_0x59ac96));});});},Migration[_0x5915ec('0x15')]['addColumn']=function(_0x30be73,_0x55889b,_0x2cbd87){const _0x153fed=_0x5915ec,_0x341eb7=this;this[_0x153fed('0x20')]['enqueue'](function(){const _0x5aca1e=_0x153fed;return _0x341eb7[_0x5aca1e('0x10')][_0x5aca1e('0x1')](_0x30be73,_0x55889b,_0x2cbd87)['then'](function(){logger['info']('Added\x20column\x20%s\x20to\x20%s',_0x55889b,_0x30be73);})[_0x5aca1e('0xe')](function(_0x2536ea){const _0x1bb5d2=_0x5aca1e;logger[_0x1bb5d2('0x12')](JSON[_0x1bb5d2('0x18')](_0x2536ea));});});},Migration[_0x5915ec('0x15')][_0x5915ec('0x8')]=function(_0x4fc542){const _0x2b7be6=_0x5915ec,_0x50c104=this;this[_0x2b7be6('0x20')][_0x2b7be6('0x0')](function(){const _0x2fd330=_0x2b7be6;return _0x50c104[_0x2fd330('0x10')][_0x2fd330('0x8')](_0x4fc542,{'force':!![]})['then'](function(){const _0x1b7789=_0x2fd330;logger[_0x1b7789('0x12')](_0x1b7789('0xa'),_0x4fc542);})[_0x2fd330('0xe')](function(_0x3e0754){const _0x1f6c3d=_0x2fd330;logger['info'](JSON[_0x1f6c3d('0x18')](_0x3e0754));});});},Migration['prototype'][_0x5915ec('0x16')]=function(_0x9b0421,_0x168ac4,_0x5a24e7){const _0x21234f=this;this['sequence']['enqueue'](function(){const _0x4dcef7=a909_0x7b16;return _0x21234f[_0x4dcef7('0x10')]['addIndex'](_0x9b0421,_0x168ac4,{'indexName':_0x5a24e7})[_0x4dcef7('0x1c')](function(){const _0x37790e=_0x4dcef7;logger[_0x37790e('0x12')]('addIndex\x20%s\x20%s\x20%s',_0x9b0421,_0x168ac4[_0x37790e('0x21')](','),_0x5a24e7);})[_0x4dcef7('0xe')](function(_0x5c4df0){const _0x4338d6=_0x4dcef7;logger['info'](JSON[_0x4338d6('0x18')](_0x5c4df0));});});},Migration[_0x5915ec('0x15')][_0x5915ec('0x11')]=function(_0x13e7af){const _0x4dc8fb=this;this['sequence']['enqueue'](function(){const _0x45d48d=a909_0x7b16;return _0x4dc8fb[_0x45d48d('0x10')][_0x45d48d('0x5')][_0x45d48d('0x11')](_0x13e7af)[_0x45d48d('0x1c')](function(){const _0x5b6699=_0x45d48d;logger[_0x5b6699('0x12')](_0x5b6699('0xf'),_0x13e7af);})['catch'](function(_0x2a3304){logger['info'](JSON['stringify'](_0x2a3304));});});},Migration[_0x5915ec('0x15')][_0x5915ec('0x3')]=function(_0x301869){const _0x31abc9=_0x5915ec;this['sequence'][_0x31abc9('0x0')](function(){return _0x301869();});},module[_0x5915ec('0x13')]={'up':function(_0x4d31ec,_0x1ab390){return new Promise(function(_0x4b1efd){const _0x2ae688=a909_0x7b16,_0x41af94=new Migration(_0x4d31ec);_0x41af94['dropTable'](_0x2ae688('0x9')),_0x41af94[_0x2ae688('0x8')](_0x2ae688('0x7')),_0x41af94[_0x2ae688('0x8')](_0x2ae688('0x17')),_0x41af94[_0x2ae688('0x8')]('chat_proactive_actions'),_0x41af94['dropTable'](_0x2ae688('0x4')),_0x41af94['dropTable'](_0x2ae688('0x1a')),_0x41af94['dropTable'](_0x2ae688('0x1f')),_0x41af94[_0x2ae688('0x8')]('chat_interactions'),_0x41af94[_0x2ae688('0x8')]('team_has_chat_queues'),_0x41af94[_0x2ae688('0x8')](_0x2ae688('0x22')),_0x41af94[_0x2ae688('0x8')]('chat_queues'),_0x41af94[_0x2ae688('0x8')](_0x2ae688('0x14')),_0x41af94['dropTable']('chat_websites_fields'),_0x41af94[_0x2ae688('0x8')](_0x2ae688('0xb')),_0x41af94[_0x2ae688('0x6')]('voice_queues',_0x2ae688('0xc'),{'type':_0x1ab390[_0x2ae688('0xd')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x2ae688('0x2')}),_0x41af94['final'](_0x4b1efd);});},'down':function(){}};