Repository navigation
Enforce ScheduledCommand.source choices at database level - #11
Merged
Merged
Conversation
- Add django_admin_runner_scheduledcommand_source_valid CheckConstraint (source__in [code, admin]) to ScheduledCommand.Meta + migration 0011. Fixes the django-extra-checks field-choices-constraint (X060) warning reported by downstream projects. - Sync model definitions with the frozen migration state (label default, help_texts on label/stop_requested/worker_pid) so makemigrations --check stays clean and downstream makemigrations runs no longer emit spurious AlterFields for this app. - Fix _restore_latest in test_migrations.py to migrate to the graph leaf nodes instead of a hardcoded 0006, which left later tests without the 0007+ tables when run in file order. - Add DB-level constraint tests for source and kind. - Refresh uv.lock to 0.2.0 (was still pinned at 0.1.0).
Pyright suppressions are line-scoped (unlike mypy's statement-scoped ones): after the multi-line reformat of stop_requested, the ignore comment on the BooleanField( line no longer covered the default=False argument one line below, failing the quality gate.
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
django_admin_runner_scheduledcommand_source_validCheckConstraint (source IN (code, admin)) toScheduledCommand.Meta+ migration 0011 — fixes the django-extra-checks X060 warning reported by downstream projects.labeldefault, help texts onlabel/stop_requested/worker_pid) somakemigrations --checkstays clean and downstreammakemigrationsruns no longer emit spuriousAlterFields for this app._restore_latestintest_migrations.pyto migrate to the graph leaf nodes instead of a hardcoded0006(which left later tests without the0007+tables in file-order runs).sourceandkind.uv.lockto 0.2.0 (was still pinned at 0.1.0).Testing