warrant
warrant copied to clipboard
Resource timestamps should be generated in code rather than at database level
Describe the bug
Currently each db implementation (except SQLite) has the underlying database generate the createdAt
, updatedAt
, and deletedAt
timestamps. Because timestamp implementations can vary from database to database (e.g. SQLite's timestamp function doesn't support microsecond precision, but SQLite is able to store microsecond timestamps), we should generate the timestamp in code rather than relying on the underlying database timestamp generation.
To Reproduce N/A
Expected behavior
The createdAt
, updatedAt
, and deletedAt
timestamps for all resources should be generated in code and used in the repository layer to be persisted to the db.
Additional context N/A