From 656c6a68ae474645b44f8015edb97b204014e1db Mon Sep 17 00:00:00 2001 From: Antony <97451137+TonybynMp4@users.noreply.github.com> Date: Fri, 1 Mar 2024 00:28:55 +0100 Subject: [PATCH] vehicleId as a primary key --- vehshop.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vehshop.sql b/vehshop.sql index 0b7c76c..95f28ca 100644 --- a/vehshop.sql +++ b/vehshop.sql @@ -6,7 +6,8 @@ CREATE TABLE IF NOT EXISTS `vehicle_financing` ( `paymentamount` int(11) DEFAULT NULL, `paymentsleft` int(11) DEFAULT NULL, `financetime` int(11) DEFAULT NULL, + PRIMARY KEY (`vehicleId`), FOREIGN KEY `vehicleId` (`vehicleId`) REFERENCES `player_vehicles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY `plate` (`plate`) REFERENCES `player_vehicles` (`plate`) ON DELETE CASCADE ON UPDATE CASCADE, FOREIGN KEY `citizenid` (`citizenid`) REFERENCES `players` (`citizenid`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; \ No newline at end of file +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;