You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Generated by Django 4.2.17 on 2024-12-10 17:46"""Add display_order field to Story model."""fromdjango.dbimportmigrations, modelsclassMigration(migrations.Migration):
"""Migrations."""dependencies= (
("core", "0001_initial"),
)
operations= (
migrations.AddField(
model_name="story",
name="display_order",
field=models.PositiveIntegerField(
default=0,
help_text="Order of the story in the frontend display.",
),
),
)
they use tuples for dependencies and operations to make mypy and ruff happy. django-stubs defines Migration.dependencies as an instance sequence, and ruff only allows mutable ClassVars to be defined as a class variable
rebase_migration fails to process these sorts of migration:
$ python manage.py rebase_migration core
CommandError: Could not find dependencies = [...] in '0005_story_display_order.py'
The text was updated successfully, but these errors were encountered:
graingert-coef
changed the title
support dependencies = ( ... )
support dependencies = (...)Dec 11, 2024
Description
currently I have migrations like this:
they use tuples for dependencies and operations to make mypy and ruff happy. django-stubs defines Migration.dependencies as an instance sequence, and ruff only allows mutable ClassVars to be defined as a class variable
rebase_migration fails to process these sorts of migration:
The text was updated successfully, but these errors were encountered: