Remove primary key ContributorId

`Ebook` to `Contributor` is one to many, and we don't query by ContributorId.
The table already has a SortOrder column, and we use that to order the queries.
This commit is contained in:
Mike Colagrosso 2024-10-13 21:06:08 -06:00 committed by Alex Cabal
parent 1076c9a77d
commit 3f3cf702b2
3 changed files with 4 additions and 9 deletions

View file

@ -1,5 +1,4 @@
CREATE TABLE `Contributors` (
`ContributorId` int(10) unsigned NOT NULL AUTO_INCREMENT,
`EbookId` int(10) unsigned NOT NULL,
`Name` varchar(255) NOT NULL,
`UrlName` varchar(255) NOT NULL,
@ -9,7 +8,6 @@ CREATE TABLE `Contributors` (
`FullName` varchar(255) NULL,
`NacoafUrl` varchar(255) NULL,
`SortOrder` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`ContributorId`),
KEY `index1` (`EbookId`),
KEY `index2` (`UrlName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;