commit b3fae7724db797c911bedec1e9ab1ded982691c5
Author: Ronald De Rose <email address hidden>
Date: Wed Sep 7 23:51:09 2016 +0000
Fixes password created_at errors due to the server_default
Migration 002 sets the password created_at column to a TIMESTAMP type
with a server_default=sql.func.now(). There are a couple problems
that have been uncovered with this change:
* We cannot guarantee that func.now() will generate a UTC timestamp.
* For some older versions of MySQL, the default TIMESTAMP column will
automatically be updated when other columns are updated: https://dev.mysql.com/doc/refman/5.5/en/timestamp-initialization.html
This patch fixes the problem by recreating the password created_at
column back to a DateTime type without a server_default:
1) Drop and recreate the created_at column
2) Update the created_at value
3) Set the created_at column as not nullable
Closes-Bug: #1621200
Change-Id: Id5c607a777afb6565d66a336028eba796e3846b2
(cherry picked from commit 32328de6e37e1f9f55d563f8a55087dc7d6f46e1)
Reviewed: https:/ /review. openstack. org/371839 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=b3fae7724db 797c911bedec1e9 ab1ded982691c5
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit b3fae7724db797c 911bedec1e9ab1d ed982691c5
Author: Ronald De Rose <email address hidden>
Date: Wed Sep 7 23:51:09 2016 +0000
Fixes password created_at errors due to the server_default
Migration 002 sets the password created_at column to a TIMESTAMP type default= sql.func. now(). There are a couple problems /dev.mysql. com/doc/ refman/ 5.5/en/ timestamp- initialization. html
with a server_
that have been uncovered with this change:
* We cannot guarantee that func.now() will generate a UTC timestamp.
* For some older versions of MySQL, the default TIMESTAMP column will
automatically be updated when other columns are updated:
https:/
This patch fixes the problem by recreating the password created_at
column back to a DateTime type without a server_default:
1) Drop and recreate the created_at column
2) Update the created_at value
3) Set the created_at column as not nullable
Closes-Bug: #1621200 565d66a336028eb a796e3846b2 f55d563f8a55087 dc7d6f46e1)
Change-Id: Id5c607a777afb6
(cherry picked from commit 32328de6e37e1f9