Skip to content

Make swappable dependency dynamic#16

Closed
Joel-Luca wants to merge 1 commit intomasterfrom
jch/TI-3652
Closed

Make swappable dependency dynamic#16
Joel-Luca wants to merge 1 commit intomasterfrom
jch/TI-3652

Conversation

@Joel-Luca
Copy link
Copy Markdown
Member

@Joel-Luca Joel-Luca commented Feb 19, 2026

Description

This migration has a dynamic dependency on the swappable model. The problem is that the migration has already been applied because the swappable feature was implemented later. To avoid dependency issues during migrating, the dependencies for this migration are dynamic. If the migration has already been applied, the dependencies are only 0002_remove_content_type_name. If the migration has not been applied yet, the dependencies are 0002_remove_content_type_name and the swappable dependency.

Belongs to PBI TI-3652.

Checklist

The following checklist should help us to stick to our "definition of done":

  • Proposed changes include tests.
  • Good error handling with useful messages
  • Changelog added
  • Django migration files have a meaningful name (not 0000_auto_xyz.py nor 0000_alter_xy_model).
  • Strings are set and translation catalogs have been updated (i18n-scan or i18n-update) and translations made.
  • Readme has been updated if changes interfere with the setup process.

This migration has a dynamic dependency on the swappable model. The
problem is that the migration has already been applied because the
swappable feature was implemented later. To avoid dependency issues
during migrating, the dependencies for this migration are dynamic.
If the migration has already been applied, the dependencies are only
0002_remove_content_type_name. If the migration has not been applied
yet, the dependencies are 0002_remove_content_type_name and the
swappable dependency.
@Joel-Luca Joel-Luca requested a review from a team February 19, 2026 13:30
Copy link
Copy Markdown
Contributor

@xenoy xenoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Joel-Luca Joel-Luca closed this Feb 19, 2026
@Joel-Luca Joel-Luca deleted the jch/TI-3652 branch February 19, 2026 14:55
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