From 937ddd7880aedae06ac064a8116fc8db786c4111 Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Thu, 23 Jan 2020 13:53:39 +0100 Subject: [PATCH] fix table componentType --- db/changes/10140-kings/00-componentType.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 db/changes/10140-kings/00-componentType.sql 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`;