You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When fizz automatically adds the created_at and updated_at columns to a table, it uses the timestamp instead of timestamptz columns. This sort of a issue when you are trying to handle different time zone in the database. It can become problematic when you are using AWS RDS and have clients in different TZs; the PostgreSQL database default to UTC.
I will happily submit a PR to add the functionality to "customize" the timestamp generation, but I want to check with the maintainers to see where and how I should add that customization. Naturally, I was thinking that it could be done in the Table structs (where there are different func to adjust the table name), but that isn't much better than manually added each column in the fizz migrations. Thoughts?
Thank you!
The text was updated successfully, but these errors were encountered:
I agree. the current behavior could be an issue for global applications, and it is not a best practice even though the behavior was common in the past days. Actually, there were related discussions but we just keep this behavior as is since:
The change could break existing applications
We need to be consistent on the behavior across all supported databases as much as possible
TZ things will be one of the focus areas for the next release, and I will keep my eyes on this issue.
When fizz automatically adds the
created_at
andupdated_at
columns to a table, it uses the timestamp instead of timestamptz columns. This sort of a issue when you are trying to handle different time zone in the database. It can become problematic when you are using AWS RDS and have clients in different TZs; the PostgreSQL database default to UTC.I will happily submit a PR to add the functionality to "customize" the timestamp generation, but I want to check with the maintainers to see where and how I should add that customization. Naturally, I was thinking that it could be done in the Table structs (where there are different
func
to adjust the table name), but that isn't much better than manually added each column in the fizz migrations. Thoughts?Thank you!
The text was updated successfully, but these errors were encountered: