Navigation Menu

Skip to content

Commit

Permalink
mysql57 test: set default value for timestamp explicitly
Browse files Browse the repository at this point in the history
Because MySQL 5.7 enables NO_ZERO_DATE by default. It disables DEFAULT 0.
  • Loading branch information
kou committed Apr 19, 2016
1 parent 598dc44 commit d1b204e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
@@ -1,8 +1,8 @@
DROP TABLE IF EXISTS ranges;
CREATE TABLE ranges (
id int PRIMARY KEY,
start timestamp,
end timestamp,
start timestamp DEFAULT CURRENT_TIMESTAMP,
end timestamp DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY range_key(start, end)
);
INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07");
Expand Down
Expand Up @@ -24,8 +24,8 @@ DROP TABLE IF EXISTS ranges;

CREATE TABLE ranges (
id int PRIMARY KEY,
start timestamp,
end timestamp,
start timestamp DEFAULT CURRENT_TIMESTAMP,
end timestamp DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY range_key(start, end)
);

Expand Down

0 comments on commit d1b204e

Please sign in to comment.