Open hahnn opened 1 month ago
This is an easy one I think. "end" should just be added to this list: https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress/blob/d8b83c88e29b70e8dc0fb37dc351049f52427f80/pg4wp/rewriters/CreateTableSQLRewriter.php#L147
Any others we're missing @hahnn ?
In the SQL table creation attempt below, the column name end is used, however end is a reserved PostgreSQL keyword then it triggers an error and the SQL table cannot be created.
So, the end column name can be used at the condition it's enclosed between " characters in PostgreSQL: that's the way to use reserved keywords in PostgreSQL.
So instead of having:
end datetime DEFAULT NULL,
We should have:
"end" datetime DEFAULT NULL,
Here below is the full output from the plugin: