mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 14:50:39 -04:00
Change some datetime columns to timestamp
This commit is contained in:
parent
028c8237a5
commit
88c3049d7a
8 changed files with 10 additions and 10 deletions
|
@ -3,8 +3,8 @@ CREATE TABLE IF NOT EXISTS `Artists` (
|
||||||
`Name` varchar(255) NOT NULL,
|
`Name` varchar(255) NOT NULL,
|
||||||
`UrlName` varchar(255) NOT NULL,
|
`UrlName` varchar(255) NOT NULL,
|
||||||
`DeathYear` smallint unsigned NULL,
|
`DeathYear` smallint unsigned NULL,
|
||||||
`Created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`Updated` timestamp NOT NULL,
|
`Updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`ArtistId`),
|
PRIMARY KEY (`ArtistId`),
|
||||||
UNIQUE KEY `idxUnique` (`UrlName`)
|
UNIQUE KEY `idxUnique` (`UrlName`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
|
@ -5,8 +5,8 @@ CREATE TABLE IF NOT EXISTS `Artworks` (
|
||||||
`UrlName` varchar(255) NOT NULL,
|
`UrlName` varchar(255) NOT NULL,
|
||||||
`CompletedYear` smallint unsigned NULL,
|
`CompletedYear` smallint unsigned NULL,
|
||||||
`CompletedYearIsCirca` boolean NOT NULL DEFAULT FALSE,
|
`CompletedYearIsCirca` boolean NOT NULL DEFAULT FALSE,
|
||||||
`Created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`Updated` timestamp NOT NULL,
|
`Updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
`Status` enum('unverified', 'approved', 'declined', 'in_use') DEFAULT 'unverified',
|
`Status` enum('unverified', 'approved', 'declined', 'in_use') DEFAULT 'unverified',
|
||||||
`SubmitterUserId` int(10) unsigned NULL,
|
`SubmitterUserId` int(10) unsigned NULL,
|
||||||
`ReviewerUserId` int(10) unsigned NULL,
|
`ReviewerUserId` int(10) unsigned NULL,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
CREATE TABLE IF NOT EXISTS `FeedUserAgents` (
|
CREATE TABLE IF NOT EXISTS `FeedUserAgents` (
|
||||||
`UserAgentId` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`UserAgentId` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`UserAgent` text NOT NULL,
|
`UserAgent` text NOT NULL,
|
||||||
`Created` datetime NOT NULL,
|
`Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`UserAgentId`)
|
PRIMARY KEY (`UserAgentId`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
|
@ -3,6 +3,6 @@ CREATE TABLE IF NOT EXISTS `NewsletterSubscriptions` (
|
||||||
`IsConfirmed` tinyint(1) unsigned NOT NULL DEFAULT 0,
|
`IsConfirmed` tinyint(1) unsigned NOT NULL DEFAULT 0,
|
||||||
`IsSubscribedToNewsletter` tinyint(1) unsigned NOT NULL DEFAULT 1,
|
`IsSubscribedToNewsletter` tinyint(1) unsigned NOT NULL DEFAULT 1,
|
||||||
`IsSubscribedToSummary` tinyint(1) unsigned NOT NULL DEFAULT 1,
|
`IsSubscribedToSummary` tinyint(1) unsigned NOT NULL DEFAULT 1,
|
||||||
`Created` datetime NOT NULL,
|
`Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`UserId`)
|
PRIMARY KEY (`UserId`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
CREATE TABLE IF NOT EXISTS `PendingPayments` (
|
CREATE TABLE IF NOT EXISTS `PendingPayments` (
|
||||||
`Created` datetime NOT NULL,
|
`Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`Processor` enum('fractured_atlas') NOT NULL,
|
`Processor` enum('fractured_atlas') NOT NULL,
|
||||||
`TransactionId` varchar(80) NOT NULL,
|
`TransactionId` varchar(80) NOT NULL,
|
||||||
`ProcessedOn` datetime DEFAULT NULL
|
`ProcessedOn` datetime DEFAULT NULL
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
CREATE TABLE IF NOT EXISTS `PollVotes` (
|
CREATE TABLE IF NOT EXISTS `PollVotes` (
|
||||||
`UserId` int(10) unsigned NOT NULL,
|
`UserId` int(10) unsigned NOT NULL,
|
||||||
`PollItemId` int(10) unsigned NOT NULL,
|
`PollItemId` int(10) unsigned NOT NULL,
|
||||||
`Created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
UNIQUE KEY `idxUnique` (`PollItemId`,`UserId`)
|
UNIQUE KEY `idxUnique` (`PollItemId`,`UserId`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
CREATE TABLE IF NOT EXISTS `Polls` (
|
CREATE TABLE IF NOT EXISTS `Polls` (
|
||||||
`PollId` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`PollId` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`Created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`Name` varchar(255) NOT NULL,
|
`Name` varchar(255) NOT NULL,
|
||||||
`UrlName` varchar(255) NOT NULL,
|
`UrlName` varchar(255) NOT NULL,
|
||||||
`Description` text DEFAULT NULL,
|
`Description` text DEFAULT NULL,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
CREATE TABLE IF NOT EXISTS `Sessions` (
|
CREATE TABLE IF NOT EXISTS `Sessions` (
|
||||||
`UserId` int(10) unsigned NOT NULL,
|
`UserId` int(10) unsigned NOT NULL,
|
||||||
`Created` datetime NOT NULL,
|
`Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`SessionId` char(36) NOT NULL,
|
`SessionId` char(36) NOT NULL,
|
||||||
KEY `idxUserId` (`UserId`),
|
KEY `idxUserId` (`UserId`),
|
||||||
KEY `idxSessionId` (`SessionId`)
|
KEY `idxSessionId` (`SessionId`)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue