Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MySQL SystemMethods.CurrentUTCDateTime to Use Expression #1797

Merged

Conversation

etherfactor
Copy link
Contributor

Should fix #1796.

Currently, when creating a MySQL column using the SystemMethods.CurrentUTCDateTime, a MySQL syntax error is thrown, as UTC_TIMESTAMP is not a literal constant.

Unit tests were added, but integration tests were not. I could not find any integration tests for SystemMethods defaults, though I can add some for the DBMS I am familiar with, if desired. (MySQL, SQL Server, and possibly PostgreSQL, but I am not familiar enough with Hana, DB2, etc. to get those integration tests working.)

Adjustments made based on MySQL documentation: https://dev.mysql.com/doc/refman/8.0/en/data-type-defaults.html#data-types-defaults-explicit

I am relatively certain this is not a breaking change, as based on the documentation, it does not look like UTC_TIMESTAMP would have worked in any MySQL version prior to 8.0.13.

@jzabroski
Copy link
Collaborator

Forced ci build to run. Github breaking automatic ci builds is tough.

@jzabroski jzabroski merged commit 0976d43 into fluentmigrator:main May 19, 2024
1 check passed
@jzabroski
Copy link
Collaborator

Thank you for your contribution!

@jzabroski jzabroski added this to the 6.0.0 milestone May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating a MySql 8 Table with CurrentUTCDateTime Causes MySQL Syntax Error
2 participants