cau 10144 upadte structure db
gitea/salix/dev This commit looks good Details

This commit is contained in:
Bernat 2019-03-13 09:45:49 +01:00
parent 5f5ce1a765
commit 2c600a5af4
4 changed files with 25 additions and 12 deletions

View File

@ -1,10 +1,7 @@
USE `hedera`;
DROP procedure IF EXISTS `orderGetTotal`;
DROP procedure IF EXISTS `hedera`.`orderGetTotal`;
DELIMITER $$ DELIMITER $$
USE `hedera`$$ CREATE DEFINER=`root`@`%` PROCEDURE `hedera`.`orderGetTotal`()
CREATE DEFINER=`root`@`%` PROCEDURE `orderGetTotal`()
BEGIN BEGIN
/** /**
* Calcula el total con IVA para un conjunto de orders. * Calcula el total con IVA para un conjunto de orders.

View File

@ -5,12 +5,12 @@ DELIMITER $$
USE `vn`$$ USE `vn`$$
CREATE DEFINER=`root`@`%` PROCEDURE `ticketGetProblems`() CREATE DEFINER=`root`@`%` PROCEDURE `ticketGetProblems`()
BEGIN BEGIN
/* /**
* Obtiene los problemas de uno o varios tickets * Obtiene los problemas de uno o varios tickets
* *
* @table tmp.ticketGetProblems(ticketFk, clientFk, warehouseFk, shipped) * @table tmp.ticketGetProblems(ticketFk, clientFk, warehouseFk, shipped)
* @return tmp.ticketProblems * @return tmp.ticketProblems
*/ */
DECLARE vWarehouse INT; DECLARE vWarehouse INT;
DECLARE vDate DATE; DECLARE vDate DATE;
DECLARE vAvailableCache INT; DECLARE vAvailableCache INT;

View File

@ -0,0 +1,16 @@
ALTER TABLE `vn`.`itemLog`
CHANGE COLUMN `id` `id` INT(11) NOT NULL AUTO_INCREMENT ,
ADD PRIMARY KEY (`id`);
ALTER TABLE `vn`.`itemLog`
DROP FOREIGN KEY `itemLogUserFk`;
ALTER TABLE `vn`.`itemLog`
CHANGE COLUMN `id` `id` INT(11) NOT NULL AUTO_INCREMENT ,
CHANGE COLUMN `userFk` `userFk` INT(10) UNSIGNED NULL DEFAULT NULL ;
ALTER TABLE `vn`.`itemLog`
ADD CONSTRAINT `itemLogUserFk`
FOREIGN KEY (`userFk`)
REFERENCES `account`.`user` (`id`)
ON DELETE CASCADE
ON UPDATE CASCADE;

View File

@ -1,3 +1,3 @@
/* Añadir a producción cuando se suba salix */ /* Añadir a producción cuando se suba salix */
DROP TRIGGER vn2008.ClientesAfterInsert; DROP TRIGGER IF EXISTS vn2008.ClientesAfterInsert;