Skip to content

Conversation

@kargig
Copy link
Owner

@kargig kargig commented Jan 10, 2026

Update SQLAlchemy models to explicitly define ON DELETE behaviors (CASCADE/SET NULL) matching the database schema. Add migration 0060 to:

  • Clean up orphaned newsletter references in parsed_dive_trips
  • Remove duplicate/conflicting foreign keys in production
  • Normalize api_keys indexes
  • Standardize foreign keys across local and production environments

This resolves persistent Alembic drift and IntegrityError 1452 in production.

Update SQLAlchemy models to explicitly define `ON DELETE` behaviors
(CASCADE/SET NULL) matching the database schema. Add migration 0060 to:
- Clean up orphaned newsletter references in parsed_dive_trips
- Remove duplicate/conflicting foreign keys in production
- Normalize api_keys indexes
- Standardize foreign keys across local and production environments

This resolves persistent Alembic drift and IntegrityError 1452 in
production.
@kargig kargig merged commit 668b31c into main Jan 10, 2026
1 check passed
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