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

Replace DATETIME columns with INTEGER #131

Open
wants to merge 1 commit into
base: fix-117-rename-deadletterat
Choose a base branch
from

Conversation

markstory
Copy link
Member

SQlite doesn't have a specific storage type for datetime values and uses TEXT instead. This requires careful use of datetime() functions on value. By switching to INTEGER columns we won't get burned by future changes to datetime logic if we forget a function. It should also result in smaller database sizes. sqlx includes trait implementations to convert DateTime<Utc> into a timestamp already and from a timestamp into DateTime<Utc>.

I've also made remove_at required as we should not store an activation that cannot be purged in the future.

Fixes #111

SQlite doesn't have a specific storage type for datetime values and uses
TEXT instead. This requires careful use of `datetime()` functions on
value. By switching to INTEGER columns we won't get burned by future
changes to datetime logic if we forget a function. It should also result
in smaller database sizes.

I've also made `remove_at` required as we should not store an activation
that cannot be purged in the future.

Fixes #111
@markstory markstory requested a review from a team as a code owner January 17, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant