diff --git a/db/changes/10004-mother/00-tarifaComponentes.sql b/db/changes/10004-mother/00-tarifaComponentes.sql new file mode 100644 index 000000000..ac22ce309 --- /dev/null +++ b/db/changes/10004-mother/00-tarifaComponentes.sql @@ -0,0 +1,2 @@ +ALTER TABLE `bi`.`tarifa_componentes` +ADD COLUMN `code` VARCHAR(45) NULL DEFAULT NULL AFTER `is_renewable`; diff --git a/db/changes/10004-mother/01-componentRate.sql b/db/changes/10004-mother/01-componentRate.sql new file mode 100644 index 000000000..2ee8242fd --- /dev/null +++ b/db/changes/10004-mother/01-componentRate.sql @@ -0,0 +1,16 @@ + +CREATE + OR REPLACE ALGORITHM = UNDEFINED + DEFINER = `root`@`%` + SQL SECURITY DEFINER +VIEW `vn`.`componentRate` AS + SELECT + `t`.`Id_Componente` AS `id`, + `t`.`Componente` AS `name`, + `t`.`tarifa_componentes_series_id` AS `componentTypeRate`, + `t`.`tarifa_class` AS `classRate`, + `t`.`tax` AS `tax`, + `t`.`is_renewable` AS `isRenewable`, + `t`.`code` AS `code` + FROM + `bi`.`tarifa_componentes` `t`;