From 175b916a44d166878a5df5a958b7f32af2e50280 Mon Sep 17 00:00:00 2001 From: Rob Holland Date: Mon, 3 Oct 2022 10:30:19 +0100 Subject: [PATCH] Use safer default TIMESTAMP for MySQL. (#3424) This avoids compatibility issues with differing versions of MySQL. Using 24 hours after the minimum timestamp value allows for any timezone adjustment that MySQL would do to get a UTC value before storing. The timezone suffix is not supported by all current MySQL versions/derivatives. Fixes #119 --- schema/mysql/v57/temporal/versioned/v1.0/schema.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/schema/mysql/v57/temporal/versioned/v1.0/schema.sql b/schema/mysql/v57/temporal/versioned/v1.0/schema.sql index 7a4c9fd7215..84a1f8c2c6c 100644 --- a/schema/mysql/v57/temporal/versioned/v1.0/schema.sql +++ b/schema/mysql/v57/temporal/versioned/v1.0/schema.sql @@ -248,13 +248,13 @@ CREATE TABLE cluster_membership rpc_address VARCHAR(15) NOT NULL, rpc_port SMALLINT NOT NULL, role TINYINT NOT NULL, - session_start TIMESTAMP DEFAULT '1970-01-01 00:00:01+00:00', - last_heartbeat TIMESTAMP DEFAULT '1970-01-01 00:00:01+00:00', - record_expiry TIMESTAMP DEFAULT '1970-01-01 00:00:01+00:00', + session_start TIMESTAMP DEFAULT '1970-01-02 00:00:01', + last_heartbeat TIMESTAMP DEFAULT '1970-01-02 00:00:01', + record_expiry TIMESTAMP DEFAULT '1970-01-02 00:00:01', INDEX (role, host_id), INDEX (role, last_heartbeat), INDEX (rpc_address, role), INDEX (last_heartbeat), INDEX (record_expiry), PRIMARY KEY (membership_partition, host_id) -); \ No newline at end of file +);