Skip to content

Commit

Permalink
vehicleId as a primary key
Browse files Browse the repository at this point in the history
  • Loading branch information
TonybynMp4 authored Feb 29, 2024
1 parent 0c99840 commit 656c6a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vehshop.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

0 comments on commit 656c6a6

Please sign in to comment.