Skip to content

Customize generated PostgreSQL created_at and updated_at columns to use timestamptz #106

@55octet

Description

@55octet

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!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions