mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 15:20:32 -04:00
Remove primary key EbookSourceId
There is a one to many relationship between `Ebook` and `EbookSource`, and we don't query by `EbookSourceId`. We add a `SortOrder` column to keep the sources in the same order as specified in `content.opf`.
This commit is contained in:
parent
4e8ba5ddaa
commit
1076c9a77d
4 changed files with 19 additions and 9 deletions
|
@ -1,8 +1,7 @@
|
|||
CREATE TABLE `EbookSources` (
|
||||
`EbookSourceId` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`EbookId` int(10) unsigned NOT NULL,
|
||||
`Type` enum('project_gutenberg', 'project_gutenberg_australia', 'project_gutenberg_canada', 'internet_archive', 'hathi_trust', 'wikisource', 'google_books', 'faded_page', 'other') DEFAULT 'other',
|
||||
`Url` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`EbookSourceId`),
|
||||
`SortOrder` tinyint(3) unsigned NOT NULL,
|
||||
KEY `index1` (`EbookId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue