feat: refs #6738 crear las Fk de la tabla flight #2054

Merged
robert merged 26 commits from 6738-cleanTables2008Part2to2 into dev 2024-04-05 11:51:22 +00:00
5 changed files with 8 additions and 8 deletions
Showing only changes of commit a6de9fd370 - Show all commits

View File

@ -2,4 +2,4 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER SQL SECURITY DEFINER
VIEW `vn2008`.`Proveedores_cargueras` VIEW `vn2008`.`Proveedores_cargueras`
AS SELECT `fs`.`supplierFk` AS `Id_Proveedor` AS SELECT `fs`.`supplierFk` AS `Id_Proveedor`
FROM `vn`.`freightSupplier` `fs` FROM `vn`.`supplierFreight` `fs`

View File

@ -3,4 +3,4 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
VIEW `vn2008`.`Tramos` VIEW `vn2008`.`Tramos`
AS SELECT `s`.`id` AS `id`, AS SELECT `s`.`id` AS `id`,
`s`.`section` AS `Tramo` `s`.`section` AS `Tramo`
FROM `vn`.`section` `s` FROM `vn`.`timeSlots` `s`

View File

@ -1,5 +1,5 @@
-- Place your SQL code here -- Place your SQL code here
ALTER TABLE IF EXISTS `vn2008`.`Tramos` RENAME `vn`.`section`; ALTER TABLE IF EXISTS `vn2008`.`Tramos` RENAME `vn`.`timeSlots`;
robert marked this conversation as resolved Outdated

primer revisa que realment es gasta, si ja ho has mirat chatGpt proposa timeSlots,
crec que es prou intuitiu

primer revisa que realment es gasta, si ja ho has mirat chatGpt proposa timeSlots, crec que es prou intuitiu
ALTER TABLE IF EXISTS `vn`.`section` ALTER TABLE IF EXISTS `vn`.`timeSlots`
CHANGE COLUMN IF EXISTS `Tramo` `section` time NOT NULL; CHANGE COLUMN IF EXISTS `Tramo` `section` time NOT NULL;

View File

@ -1,5 +1,5 @@
-- Place your SQL code here -- Place your SQL code here
ALTER TABLE IF EXISTS `vn2008`.`Proveedores_cargueras` RENAME `vn`.`freightSupplier`; ALTER TABLE IF EXISTS `vn2008`.`Proveedores_cargueras` RENAME `vn`.`supplierFreight`;
robert marked this conversation as resolved Outdated

jo crec que faria supplierFreight, en client tb ho tenim així, les taules que estan relacionades comencen per client.

jo crec que faria supplierFreight, en client tb ho tenim així, les taules que estan relacionades comencen per client.
ALTER TABLE IF EXISTS `vn`.`freightSupplier` ALTER TABLE IF EXISTS `vn`.`supplierFreight`
CHANGE COLUMN IF EXISTS `Id_Proveedor` `supplierFk` int(10) unsigned NOT NULL; CHANGE COLUMN IF EXISTS `Id_Proveedor` `supplierFk` int(10) unsigned NOT NULL;

View File

@ -4,7 +4,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
SELECT 1; SELECT 1;
GRANT SELECT ON TABLE vn2008.Tramos TO `employee`; GRANT SELECT ON TABLE vn2008.Tramos TO `employee`;
GRANT SELECT ON TABLE vn.section TO `employee`; GRANT SELECT ON TABLE vn.timeSlots TO `employee`;
CREATE OR REPLACE DEFINER=`root`@`localhost` CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER SQL SECURITY DEFINER
@ -12,4 +12,4 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
SELECT 1; SELECT 1;
GRANT SELECT ON TABLE vn2008.Proveedores_cargueras TO `buyer`; GRANT SELECT ON TABLE vn2008.Proveedores_cargueras TO `buyer`;
GRANT SELECT ON TABLE vn.freightSupplier TO `buyer`; GRANT SELECT ON TABLE vn.supplierFreight TO `buyer`;