Skip to content

Commit

Permalink
replace id PK with model
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenshiin13 committed Nov 5, 2024
1 parent 93e9fca commit 86c5e64
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions [SQL]/legacy.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;

--
Expand Down Expand Up @@ -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`
--
Expand Down

0 comments on commit 86c5e64

Please sign in to comment.