You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by "Michael Jumper (JIRA)" <ji...@apache.org> on 2017/01/21 21:08:26 UTC

[jira] [Commented] (GUACAMOLE-163) Database schema no longer compatible with MySQL 5.5

    [ https://issues.apache.org/jira/browse/GUACAMOLE-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15833142#comment-15833142 ] 

Michael Jumper commented on GUACAMOLE-163:
------------------------------------------

If the application will always provide its own value when performing an {{INSERT}}, we might be able to do away with {{DEFAULT CURRENT_TIMESTAMP}} entirely. The upgrade script would need to change to add the column, update everything to {{CURRENT_TIMESTAMP}} or {{NOW}}, and *then* add the {{NOT NULL}} constraint, but that might be the easiest and most sane approach.

> Database schema no longer compatible with MySQL 5.5
> ---------------------------------------------------
>
>                 Key: GUACAMOLE-163
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-163
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole-auth-jdbc-mysql
>    Affects Versions: 0.9.11-incubating
>            Reporter: Michael Jumper
>            Priority: Blocker
>             Fix For: 0.9.11-incubating
>
>
> Recent changes from GUACAMOLE-36 modify the MySQL schema, adding an additional {{password_date}} column to {{guacamole_user}} which records the time that the password was last set. This column defaults to the current date:
> {code:none}
> --
> -- Add per-user password set date
> --
> ALTER TABLE guacamole_user
>     ADD COLUMN password_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP;
> {code}
> Unfortunately, the ability to specify {{DEFAULT CURRENT_TIMESTAMP}} for a {{DATETIME}} column was a new feature in MySQL 5.6, and cannot be used for any older version of MySQL:
> http://dev.mysql.com/doc/refman/5.6/en/timestamp-initialization.html
> The schema will need to be updated such that compatibility with previously-working versions of MySQL is not broken.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)