refs #6372 feat: vn2008 to vn

This commit is contained in:
David Domenech 2024-01-31 14:50:56 +01:00
parent a81a42c2e7
commit bad00167fa
2 changed files with 6 additions and 5 deletions

View File

@ -4,10 +4,10 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
AS SELECT
`f`.`id` AS `flight_id`,
`f`.`duration` AS `duration`,
`f`.`route` AS `route`,
`f`.`flightPath` AS `route`,
`f`.`days` AS `days`,
`f`.`airlineFk` AS `airline_id`,
`f`.`airportOutFk` AS `airport_out`,
`f`.`airportInFk` AS `airport_in`
`f`.`airportArrivalFk` AS `airport_out`,
`f`.`airportDepartureFk` AS `airport_in`
FROM
`vn`.`flight` `f`;

View File

@ -3,5 +3,6 @@ ALTER TABLE IF EXISTS `vn2008`.`flight` RENAME `vn`.`flight`;
ALTER TABLE IF EXISTS `vn`.`flight`
CHANGE COLUMN IF EXISTS `flight_id` `id` varchar(10) NOT NULL,
CHANGE COLUMN IF EXISTS `airline_id` `airlineFk` smallint(2) unsigned DEFAULT NULL,
CHANGE COLUMN IF EXISTS `airport_out` `airportOutFk` varchar(3) NOT NULL,
CHANGE COLUMN IF EXISTS `airport_in` `airportInFk` varchar(3) NOT NULL;
CHANGE COLUMN IF EXISTS `route` `flightPath` varchar(20) DEFAULT NULL,
CHANGE COLUMN IF EXISTS `airport_out` `airportArrivalFk` varchar(3) NOT NULL,
CHANGE COLUMN IF EXISTS `airport_in` `airportDepartureFk` varchar(3) NOT NULL;