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

Tighten up handling of time_created, time_updated. #893

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

danielballan
Copy link
Member

@danielballan danielballan commented Feb 19, 2025

The goal here is to make the behavior more explicit and also to avoid a configuration-dependent failure I observed in production, where server_default can be applied too late to satisfy a NOT NULL constraint:

sqlalchemy.exc.IntegrityError: (sqlalchemy.dialects.postgresql.asyncpg.IntegrityError) <class 'asyncpg.exceptions.NotNullViolationError'>: null value in column "time_created" of relation "sessions" violates not-null constraint

Checklist

  • Add a Changelog entry
  • Add the ticket number which this PR closes to the comment section

Copy link
Contributor

@padraic-shafer padraic-shafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable.

@padraic-shafer padraic-shafer merged commit cc854bb into bluesky:main Feb 19, 2025
8 checks passed
@danielballan danielballan deleted the timestamp-nullification branch February 19, 2025 19:15
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.

2 participants