mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 10:31:59 -04:00
Newer versions of MariaDB, such as this one included with Ubuntu 24.04: Server version: 10.11.8-MariaDB-0ubuntu0.24.04.1 Ubuntu 24.04 change the default behavior to not automatically set timestamp defaults and on update values: $ mysqld --verbose --help | grep explicit-defaults-for-timestamp explicit-defaults-for-timestamp TRUE whereas my older machines allowed it: $ mysqld --verbose --help | grep explicit-defaults-for-timestamp explicit-defaults-for-timestamp FALSE More background on the flag here: https://dev.mysql.com/doc/refman/8.4/en/timestamp-initialization.html
32 lines
1.2 KiB
SQL
32 lines
1.2 KiB
SQL
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 DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
`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`),
|
|
KEY `index2` (`EbookCreated`),
|
|
FULLTEXT `idxSearch` (`IndexableText`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|