e27e075ee2b265cf3a7eb9883815cdec0f554e38
[motion-next.git] / server / migrations / 2.0.23.js
1 const a902_0x2765=['migration','renameColumn','newTab','ENUM','int_salesforce_accounts','openchannel_applications','type','dropTable','info','exports','prototype','integrationTab','addColumn','stringify','catch','int_zendesk_accounts','openchannel_messages','then','openchannel_accounts','../config/logger','removeColumn','table\x20dropped\x20%s','queryInterface','Removed\x20column\x20%s\x20from\x20%s'];(function(_0x46f670,_0x27650f){const _0x1fad70=function(_0x516de0){while(--_0x516de0){_0x46f670['push'](_0x46f670['shift']());}};_0x1fad70(++_0x27650f);}(a902_0x2765,0x1c2));const a902_0x1fad=function(_0x46f670,_0x27650f){_0x46f670=_0x46f670-0x0;let _0x1fad70=a902_0x2765[_0x46f670];return _0x1fad70;};const _0x332714=a902_0x1fad;'use strict';const logger=require(_0x332714('0x1'))(_0x332714('0x6')),Migration=function(_0x516de0){const _0x2c715c=_0x332714;this[_0x2c715c('0x4')]=_0x516de0;};Migration[_0x332714('0x10')][_0x332714('0x12')]=function(_0xd1a6d7,_0x42374e,_0x46ddc8){const _0x5b05db=_0x332714;return this[_0x5b05db('0x4')][_0x5b05db('0x12')](_0xd1a6d7,_0x42374e,_0x46ddc8)[_0x5b05db('0x17')](function(){const _0x2abc1e=_0x5b05db;logger[_0x2abc1e('0xe')]('Added\x20column\x20%s\x20to\x20%s',_0x42374e,_0xd1a6d7);})[_0x5b05db('0x14')](function(_0x458759){const _0x5749fe=_0x5b05db;logger[_0x5749fe('0xe')](JSON[_0x5749fe('0x13')](_0x458759));});},Migration[_0x332714('0x10')][_0x332714('0x2')]=function(_0xa81a18,_0x2c6381){const _0x34b2dd=_0x332714;return this['queryInterface']['removeColumn'](_0xa81a18,_0x2c6381)[_0x34b2dd('0x17')](function(){const _0x43b427=_0x34b2dd;logger[_0x43b427('0xe')](_0x43b427('0x5'),_0x2c6381,_0xa81a18);})[_0x34b2dd('0x14')](function(_0x20589f){const _0x4b1f96=_0x34b2dd;logger[_0x4b1f96('0xe')](JSON[_0x4b1f96('0x13')](_0x20589f));});},Migration[_0x332714('0x10')][_0x332714('0x7')]=function(_0x39d997,_0x43b7d4,_0x26c8ca){const _0x410f97=_0x332714;return this['queryInterface'][_0x410f97('0x7')](_0x39d997,_0x43b7d4,_0x26c8ca)['then'](function(){logger['info']('Renamed\x20column\x20from\x20%s\x20to\x20%s\x20on\x20%s',_0x43b7d4,_0x26c8ca,_0x39d997);})[_0x410f97('0x14')](function(_0x1b73d3){const _0x37978a=_0x410f97;logger[_0x37978a('0xe')](JSON['stringify'](_0x1b73d3));});},Migration[_0x332714('0x10')][_0x332714('0xd')]=function(_0x47fff2){const _0x5f4a7b=_0x332714;return this['queryInterface'][_0x5f4a7b('0xd')](_0x47fff2)[_0x5f4a7b('0x17')](function(){const _0x125e85=_0x5f4a7b;logger['info'](_0x125e85('0x3'),_0x47fff2);})['catch'](function(_0x3ad629){logger['info'](JSON['stringify'](_0x3ad629));});},module[_0x332714('0xf')]={'up':function(_0x14c4a8,_0x29729e){const _0x122345=_0x332714,_0x1145a0=new Migration(_0x14c4a8);_0x1145a0[_0x122345('0x12')]('int_salesforce_accounts',_0x122345('0xc'),{'type':_0x29729e[_0x122345('0x9')](_0x122345('0x11'),_0x122345('0x8')),'defaultValue':_0x122345('0x11')}),_0x1145a0[_0x122345('0x12')](_0x122345('0x15'),_0x122345('0xc'),{'type':_0x29729e[_0x122345('0x9')]('integrationTab',_0x122345('0x8')),'defaultValue':_0x122345('0x11')}),_0x1145a0[_0x122345('0xd')]('user_has_openchannel_rooms',{'force':!![]}),_0x1145a0[_0x122345('0xd')](_0x122345('0x16'),{'force':!![]}),_0x1145a0[_0x122345('0xd')]('openchannel_rooms',{'force':!![]}),_0x1145a0[_0x122345('0xd')](_0x122345('0xb'),{'force':!![]}),_0x1145a0['dropTable'](_0x122345('0x0'),{'force':!![]});},'down':function(_0x4f0b91){const _0x36b28f=_0x332714,_0x600783=new Migration(_0x4f0b91);_0x600783[_0x36b28f('0x2')](_0x36b28f('0xa'),'type'),_0x600783[_0x36b28f('0x2')](_0x36b28f('0x15'),_0x36b28f('0xc'));}};