warrant icon indicating copy to clipboard operation
warrant copied to clipboard

Resource timestamps should be generated in code rather than at database level

Open kkajla12 opened this issue 1 year ago • 0 comments

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

kkajla12 avatar Apr 21 '23 20:04 kkajla12