web/config/sql/se/EbookSources.sql
Mike Colagrosso 1076c9a77d 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`.
2024-11-04 13:16:56 -06:00

7 lines
411 B
SQL

CREATE TABLE `EbookSources` (
`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,
`SortOrder` tinyint(3) unsigned NOT NULL,
KEY `index1` (`EbookId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;