﻿select id, prm_sk_host_chat, prm_chat_api, prm_media_simultaneo, prm_chat_api_supervisor into pbx_parametros_bk from pbx_parametros where id = 1;

alter table pbx_parametros drop column  prm_chat_api_supervisor;
alter table pbx_parametros add prm_chat_api_supervisor varchar(255);


alter table pbx_parametros drop column prm_sk_host_chat;
alter table pbx_parametros add prm_sk_host_chat varchar(255);


alter table pbx_parametros drop column prm_chat_api;
alter table pbx_parametros add prm_chat_api varchar(255);


update pbx_parametros set prm_chat_api_supervisor = (select prm_chat_api_supervisor from pbx_parametros_bk where id = 1);
update pbx_parametros set prm_chat_api = (select prm_chat_api from pbx_parametros_bk where id = 1);
update pbx_parametros set prm_sk_host_chat = (select prm_sk_host_chat from pbx_parametros_bk where id = 1);

drop table pbx_parametros_bk;
--select id, prm_sk_host_chat, prm_chat_api, prm_media_simultaneo, prm_chat_api_supervisor from pbx_parametros where id = 1;

