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

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

Open
kkajla12 opened this issue Apr 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@kkajla12
Copy link
Member

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

@akajla09 akajla09 added the bug Something isn't working as expected label Apr 21, 2023
@akajla09 akajla09 added enhancement New feature or request and removed bug Something isn't working as expected labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants