mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 07:40:39 -04:00
Initial Ebook DB schema
This commit is contained in:
parent
f97539f399
commit
073f138c47
9 changed files with 87 additions and 0 deletions
9
config/sql/se/Collections.sql
Normal file
9
config/sql/se/Collections.sql
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
CREATE TABLE `Collections` (
|
||||||
|
`EbookId` int(10) unsigned NOT NULL,
|
||||||
|
`Name` varchar(255) NOT NULL,
|
||||||
|
`UrlName` varchar(255) NOT NULL,
|
||||||
|
`SequenceNumber` int(10) unsigned NULL,
|
||||||
|
`Type` varchar(255) NULL,
|
||||||
|
KEY `index1` (`EbookId`),
|
||||||
|
KEY `index2` (`UrlName`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
13
config/sql/se/Contributors.sql
Normal file
13
config/sql/se/Contributors.sql
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
CREATE TABLE `Contributors` (
|
||||||
|
`EbookId` int(10) unsigned NOT NULL,
|
||||||
|
`Name` varchar(255) NOT NULL,
|
||||||
|
`UrlName` varchar(255) NOT NULL,
|
||||||
|
`SortName` varchar(255) NULL,
|
||||||
|
`WikipediaUrl` varchar(255) NULL,
|
||||||
|
`MarcRole` varchar(10) NULL,
|
||||||
|
`FullName` varchar(255) NULL,
|
||||||
|
`NacoafUrl` varchar(255) NULL,
|
||||||
|
`SortOrder` tinyint(3) unsigned NOT NULL,
|
||||||
|
KEY `index1` (`EbookId`),
|
||||||
|
KEY `index2` (`UrlName`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
5
config/sql/se/EbookLocSubjects.sql
Normal file
5
config/sql/se/EbookLocSubjects.sql
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
CREATE TABLE `EbookLocSubjects` (
|
||||||
|
`EbookId` int(10) unsigned NOT NULL,
|
||||||
|
`LocSubjectId` int(10) unsigned NOT NULL,
|
||||||
|
UNIQUE KEY `idxUnique` (`EbookId`,`LocSubjectId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
6
config/sql/se/EbookSources.sql
Normal file
6
config/sql/se/EbookSources.sql
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE TABLE `EbookSources` (
|
||||||
|
`EbookId` int(10) unsigned NOT NULL,
|
||||||
|
`Type` tinyint(4) unsigned NOT NULL,
|
||||||
|
`Url` varchar(255) NOT NULL,
|
||||||
|
KEY `index1` (`EbookId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
5
config/sql/se/EbookTags.sql
Normal file
5
config/sql/se/EbookTags.sql
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
CREATE TABLE `EbookTags` (
|
||||||
|
`EbookId` int(10) unsigned NOT NULL,
|
||||||
|
`TagId` int(10) unsigned NOT NULL,
|
||||||
|
UNIQUE KEY `idxUnique` (`EbookId`,`TagId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
31
config/sql/se/Ebooks.sql
Normal file
31
config/sql/se/Ebooks.sql
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
CREATE TABLE `Ebooks` (
|
||||||
|
`EbookId` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`Identifier` varchar(511) NOT NULL,
|
||||||
|
`Created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`Updated` timestamp NOT NULL,
|
||||||
|
`WwwFilesystemPath` varchar(511) NOT NULL,
|
||||||
|
`RepoFilesystemPath` varchar(511) NOT NULL,
|
||||||
|
`KindleCoverUrl` varchar(511) NULL,
|
||||||
|
`EpubUrl` varchar(511) NULL,
|
||||||
|
`AdvancedEpubUrl` varchar(511) NULL,
|
||||||
|
`KepubUrl` varchar(511) NULL,
|
||||||
|
`Azw3Url` varchar(511) NULL,
|
||||||
|
`DistCoverUrl` varchar(511) NULL,
|
||||||
|
`Title` varchar(255) NOT NULL,
|
||||||
|
`FullTitle` varchar(255) NULL,
|
||||||
|
`AlternateTitle` varchar(255) NULL,
|
||||||
|
`Description` text NOT NULL,
|
||||||
|
`LongDescription` text NOT NULL,
|
||||||
|
`Language` varchar(10) NULL,
|
||||||
|
`WordCount` int(10) unsigned NOT NULL,
|
||||||
|
`ReadingEase` float NOT NULL,
|
||||||
|
`GitHubUrl` varchar(255) NULL,
|
||||||
|
`WikipediaUrl` varchar(255) NULL,
|
||||||
|
`EbookCreated` datetime NOT NULL,
|
||||||
|
`EbookUpdated` datetime NOT NULL,
|
||||||
|
`TextSinglePageByteCount` bigint unsigned NOT NULL,
|
||||||
|
`IndexableText` text NOT NULL,
|
||||||
|
PRIMARY KEY (`EbookId`),
|
||||||
|
UNIQUE KEY `index1` (`Identifier`),
|
||||||
|
FULLTEXT `idxSearch` (`IndexableText`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
7
config/sql/se/GitCommits.sql
Normal file
7
config/sql/se/GitCommits.sql
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
CREATE TABLE `GitCommits` (
|
||||||
|
`EbookId` int(10) unsigned NOT NULL,
|
||||||
|
`Created` datetime NOT NULL,
|
||||||
|
`Message` text NOT NULL,
|
||||||
|
`Hash` char(40) NOT NULL,
|
||||||
|
KEY `index1` (`EbookId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
6
config/sql/se/LocSubjects.sql
Normal file
6
config/sql/se/LocSubjects.sql
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE TABLE `LocSubjects` (
|
||||||
|
`LocSubjectId` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`Name` varchar(255) NOT NULL,
|
||||||
|
PRIMARY KEY (`LocSubjectId`),
|
||||||
|
UNIQUE KEY `idxUnique` (`Name`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
5
config/sql/se/TocEntries.sql
Normal file
5
config/sql/se/TocEntries.sql
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
CREATE TABLE `TocEntries` (
|
||||||
|
`EbookId` int(10) unsigned NOT NULL,
|
||||||
|
`TocEntry` text NOT NULL,
|
||||||
|
KEY `index1` (`EbookId`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
Loading…
Add table
Add a link
Reference in a new issue