Files
postgresql-for-wordpress/pg4wp
Kevin Locke f97491346b Rewrite default '0000-00-00 00:00:00' to now()
The current rewriting changes "default '0000-00-00 00:00:00'" when it
appears in CREATE TABLE statements, but does not handle the case that a
column default value is modified.  This results in errors such as the
following during schema upgrade:

Error running :
ALTER TABLE wp_users ALTER COLUMN user_registered SET DEFAULT '0000-00-00 00:00:00'
---- converted to ----
ALTER TABLE wp_users ALTER COLUMN user_registered SET DEFAULT '0000-00-00 00:00:00'
----> ERROR:  date/time field value out of range: "0000-00-00 00:00:00"

Apply the conversion to ALTER TABLE statements as well.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2015-06-03 00:51:25 -06:00
..
2014-08-21 16:53:30 +00:00