GUACAMOLE-163: Remove DEFAULT CURRENT_TIMESTAMP from guacamole_user's password_date column (compatibility with MySQL 5.5 and older).

This commit is contained in:
Michael Jumper
2017-01-22 11:58:41 -08:00
parent cdf7e2ce59
commit b69599e822
6 changed files with 20 additions and 8 deletions

View File

@@ -85,7 +85,7 @@ CREATE TABLE `guacamole_user` (
`username` varchar(128) NOT NULL,
`password_hash` binary(32) NOT NULL,
`password_salt` binary(32),
`password_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`password_date` datetime NOT NULL,
-- Account disabled/expired status
`disabled` boolean NOT NULL DEFAULT 0,

View File

@@ -18,10 +18,11 @@
--
-- Create default user "guacadmin" with password "guacadmin"
INSERT INTO guacamole_user (username, password_hash, password_salt)
INSERT INTO guacamole_user (username, password_hash, password_salt, password_date)
VALUES ('guacadmin',
x'CA458A7D494E3BE824F5E1E175A1556C0F8EEF2C2D7DF3633BEC4A29C4411960', -- 'guacadmin'
x'FE24ADC5E11E2B25288D1704ABE67A79E342ECC26064CE69C5B3177795A82264');
x'FE24ADC5E11E2B25288D1704ABE67A79E342ECC26064CE69C5B3177795A82264',
NOW());
-- Grant this user all system permissions
INSERT INTO guacamole_system_permission

View File

@@ -22,7 +22,12 @@
--
ALTER TABLE guacamole_user
ADD COLUMN password_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP;
ADD COLUMN password_date DATETIME;
UPDATE guacamole_user SET password_date = NOW();
ALTER TABLE guacamole_user
MODIFY COLUMN password_date DATETIME NOT NULL;
--
-- User password history