From 86c5e64d9fe239a5f922883c8af9eca6d0898be5 Mon Sep 17 00:00:00 2001 From: Ilias Rbayti <63159154+Kenshiin13@users.noreply.github.com> Date: Tue, 5 Nov 2024 08:16:41 +0100 Subject: [PATCH] replace `id` PK with `model` --- [SQL]/legacy.sql | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/[SQL]/legacy.sql b/[SQL]/legacy.sql index 532475239..b041f32f4 100644 --- a/[SQL]/legacy.sql +++ b/[SQL]/legacy.sql @@ -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` --