Commit graph

6 commits

Author SHA1 Message Date
Mike Colagrosso
312e2105ec Change Created datetime to timestamp to match 88c3049 2024-11-04 13:16:56 -06:00
Mike Colagrosso
c3c4cbddca Adopt IF NOT EXISTS approach from 82e43cb 2024-11-04 13:16:56 -06:00
Mike Colagrosso
783a41a1ba Make Ebook Language NOT NULL 2024-11-04 13:16:56 -06:00
Mike Colagrosso
a9a0782946 Timestamps: Set DEFAULT and ON UPDATE values
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
2024-11-04 13:16:56 -06:00
Mike Colagrosso
4abf6e29d2 Add an index for EbookCreated
This is the default sort on /ebooks, so it should have an index
2024-11-04 13:16:56 -06:00
Mike Colagrosso
073f138c47 Initial Ebook DB schema 2024-11-04 13:16:56 -06:00