Repository navigation
fix(db): autogenerate keeps new FKs; enum rendering matches the model; nested import errors surface; doctor uses filtered sessions - #819
Merged
Conversation
…; nested import errors surface; doctor checks use filtered sessions (#812, #813, #814, #815) Claude-Session: https://claude.ai/code/session_01FXHA3ZicrtZ4C5QPEgxfgq
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying simple-module-python with
|
| Latest commit: |
0efc66f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7a39a5df.simple-module-python.pages.dev |
| Branch Preview URL: | https://fix-db-review-migrations.simple-module-python.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
make_include_objectskips only reflected foreign keys that the models lack. A newly modeled FK on an existing column is now emitted. An FK with the same columns and target but different options (ondelete,deferrable) is replaced with a drop plus a create. FKs that exist only in migrations stay preserved.native_enum,create_constraintandlength. A plainStrEnumfield now renders member-name labels, which is what the runtime type binds. Value labels needvalues_callableon the model. Existing revisions are not rewritten.build_module_metadatare-raises aModuleNotFoundErrorraised inside an existingmodels.py. Before, that module's tables silently dropped out of autogenerate.make doctorrunscheck_data_compatibilityon the framework's filtered sessions: soft-deleted rows are hidden and tenant queries are scoped. Doctor always enforces strict tenancy, which is stricter than a single-tenant boot, so install-wide checks must opt intoall_tenants(). Doctor no longer switches a SQLite file to WAL.docs/database/migrations.md,per-module-base.md,docs/framework/lifecycle.md,docs/module-authoring.md), the shipped migrations skill and the CHANGELOG are updated.Verification
make lintpassed, along with these suites:make test-py: 7680 passedmake test-js: 891 passedmake doctor: cleanframework/db/tests/test_db_migration_review_regressions.pyandtest_db_doctor_session_filters.py.Closes #812
Closes #813
Closes #814
Closes #815
Test plan
migrations-roundtrip-pghttps://claude.ai/code/session_01FXHA3ZicrtZ4C5QPEgxfgq