Skip to content

Update from task 4c631340-f28c-44ee-a658-3d32babe7a15#9

Merged
fiqrikm18 merged 1 commit into
developmentfrom
database-foreign-key-restoration-e7a15
Jun 22, 2026
Merged

Update from task 4c631340-f28c-44ee-a658-3d32babe7a15#9
fiqrikm18 merged 1 commit into
developmentfrom
database-foreign-key-restoration-e7a15

Conversation

@fiqrikm18

Copy link
Copy Markdown
Collaborator

This PR was created by qwen-chat coder for task 4c631340-f28c-44ee-a658-3d32babe7a15.

Key features implemented:
- Added comprehensive ORM relationship and foreign key metadata regression tests in test_database_relationships.py
- Restored missing foreign key constraints in authorization models (permission, role_permission, user_has_role) and todo model
- Converted normalized user identifier columns across 7 user models to UUID type with proper foreign key references
- Updated Alembic environment to load complete user model package for accurate metadata reflection
- Created corrective Alembic migration to convert string user IDs to UUID and create all missing foreign key constraints
- Added contract tests for the corrective migration covering both upgrade and downgrade operations

The implementation restores all 13 intended foreign keys while ensuring normalized user identifiers use UUID consistently, enabling successful database seeding without SQLAlchemy mapper errors.
@fiqrikm18 fiqrikm18 merged commit eff4ec8 into development Jun 22, 2026
1 check passed
@fiqrikm18 fiqrikm18 deleted the database-foreign-key-restoration-e7a15 branch June 22, 2026 06:11
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