Skip to content

Commit

Permalink
Timestamps can't default to null
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyD committed Jan 26, 2014
1 parent 32fe978 commit 88f8334
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ USE `skynet`;
CREATE TABLE IF NOT EXISTS `player` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(32) NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT NULL,
`last_login` timestamp NOT NULL DEFAULT NULL,
`last_logout` timestamp NOT NULL DEFAULT NULL,
`timestamp` timestamp NOT NULL DEFAULT 0,
`last_login` timestamp NOT NULL DEFAULT 0,
`last_logout` timestamp NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `unique_username` (`username`),
Expand All @@ -40,7 +40,7 @@ CREATE TABLE IF NOT EXISTS `event` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`event_type_id` int(11) NOT NULL,
`player_id` int(32) NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT NULL,
`timestamp` timestamp NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `fk_event_type` (`event_type_id`),
KEY `fk_event_player` (`player_id`)
Expand All @@ -54,9 +54,9 @@ CREATE TABLE IF NOT EXISTS `session` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`player_id` int(11) NOT NULL,
`login` int(11) NOT NULL,
`login_timestamp` timestamp NULL DEFAULT NULL,
`login_timestamp` timestamp NULL DEFAULT 0,
`logout` int(11) DEFAULT NULL,
`logout_timestamp` timestamp NULL DEFAULT NULL,
`logout_timestamp` timestamp NULL DEFAULT 0,
`duration` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_login` (`login`),
Expand Down

0 comments on commit 88f8334

Please sign in to comment.