diff --git a/db/changes/10140-kings/00-componentType.sql b/db/changes/10140-kings/00-componentType.sql new file mode 100644 index 000000000..4d102f43f --- /dev/null +++ b/db/changes/10140-kings/00-componentType.sql @@ -0,0 +1,16 @@ +ALTER TABLE `vn`.`componentType` +CHANGE COLUMN `isBase` `base` TINYINT(4) NOT NULL DEFAULT '0' COMMENT 'Marca aquellas series que se utilizan para calcular el precio base de las ventas, a efectos estadisticos' ; + + +CREATE + OR REPLACE ALGORITHM = UNDEFINED + DEFINER = `root`@`%` + SQL SECURITY DEFINER +VIEW `bi`.`tarifa_componentes_series` AS + SELECT + `ct`.`id` AS `tarifa_componentes_series_id`, + `ct`.`type` AS `Serie`, + `ct`.`base` AS `base`, + `ct`.`isMargin` AS `margen` + FROM + `vn`.`componentType` `ct`;