replace id PK with model

This commit is contained in:
Ilias Rbayti
2024-11-05 08:16:41 +01:00
parent 93e9fca766
commit 86c5e64d9f
+8 -3
View File
@@ -427,12 +427,10 @@ CREATE TABLE `user_licenses` (
--
CREATE TABLE `vehicles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(60) NOT NULL,
`model` varchar(60) NOT NULL,
`price` int(11) NOT NULL,
`category` varchar(60) DEFAULT NULL,
PRIMARY KEY (`id`)
`category` varchar(60) DEFAULT NULL
) ENGINE=InnoDB;
--
@@ -823,6 +821,13 @@ ALTER TABLE `licenses`
ALTER TABLE `owned_vehicles`
ADD PRIMARY KEY (`plate`);
--
--
-- Indexes for table `vehicles`
--
ALTER TABLE `vehicles`
ADD PRIMARY KEY (`model`);
--
-- Indexes for table `rented_vehicles`
--