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 3fba50b commit d8fe760
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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
@@ -1,5 +1,5 @@
# Copyright(C) 2012 Kentoku SHIBA
# Copyright(C) 2012 Kouhei Sutou <kou@clear-code.com>
# Copyright(C) 2012-2016 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand All @@ -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 d8fe760

Please sign in to comment.