[PR #18827] [MERGED] Fixes: #18808 - Fix incorrect dependencies on squashed migrations #15450

Closed
opened 2025-12-30 00:21:59 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18827
Author: @bctiemann
Created: 3/6/2025
Status: Merged
Merged: 3/7/2025
Merged by: @arthanson

Base: featureHead: 18808-fix-migration-dependencies


📝 Commits (2)

  • 309fffd First batch of fixes to squashed dependencies
  • 9dc8db1 Fix all remaining squashed migrations

📊 Changes

27 files changed (+65 additions, -65 deletions)

View changed files

📝 netbox/account/migrations/0001_initial.py (+1 -1)
📝 netbox/circuits/migrations/0002_squashed_0029.py (+4 -4)
📝 netbox/circuits/migrations/0038_squashed_0042.py (+2 -2)
📝 netbox/circuits/migrations/0043_circuittype_color.py (+1 -1)
📝 netbox/core/migrations/0006_datasource_type_remove_choices.py (+1 -1)
📝 netbox/dcim/migrations/0002_squashed.py (+3 -3)
📝 netbox/dcim/migrations/0003_squashed_0130.py (+5 -5)
📝 netbox/dcim/migrations/0131_squashed_0159.py (+4 -4)
📝 netbox/dcim/migrations/0160_squashed_0166.py (+3 -3)
📝 netbox/dcim/migrations/0167_squashed_0182.py (+3 -3)
📝 netbox/dcim/migrations/0183_devicetype_exclude_from_utilization.py (+1 -1)
📝 netbox/extras/migrations/0002_squashed_0059.py (+4 -4)
📝 netbox/extras/migrations/0060_squashed_0086.py (+6 -6)
📝 netbox/extras/migrations/0087_squashed_0098.py (+2 -2)
📝 netbox/extras/migrations/0099_cachedvalue_ordering.py (+1 -1)
📝 netbox/ipam/migrations/0001_squashed.py (+3 -3)
📝 netbox/ipam/migrations/0002_squashed_0046.py (+5 -5)
📝 netbox/ipam/migrations/0047_squashed_0053.py (+1 -1)
📝 netbox/ipam/migrations/0054_squashed_0067.py (+3 -3)
📝 netbox/ipam/migrations/0068_move_l2vpn.py (+1 -1)

...and 7 more files

📄 Description

Fixes: #18808

After previously squashing migrations, many child migrations depending on those original migrations had not been updated to point to the new squashed migrations in dependencies. This caused errors when using ./manage.py sqlmigrate.

This change fixes the dependencies of all erroneous migrations to point to the correct squashed parent migrations.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/18827 **Author:** [@bctiemann](https://github.com/bctiemann) **Created:** 3/6/2025 **Status:** ✅ Merged **Merged:** 3/7/2025 **Merged by:** [@arthanson](https://github.com/arthanson) **Base:** `feature` ← **Head:** `18808-fix-migration-dependencies` --- ### 📝 Commits (2) - [`309fffd`](https://github.com/netbox-community/netbox/commit/309fffddd2f94e6521121169e6157bf5aa1cb69f) First batch of fixes to squashed dependencies - [`9dc8db1`](https://github.com/netbox-community/netbox/commit/9dc8db1fde44f2c83fc14191f89deb3466796fb5) Fix all remaining squashed migrations ### 📊 Changes **27 files changed** (+65 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `netbox/account/migrations/0001_initial.py` (+1 -1) 📝 `netbox/circuits/migrations/0002_squashed_0029.py` (+4 -4) 📝 `netbox/circuits/migrations/0038_squashed_0042.py` (+2 -2) 📝 `netbox/circuits/migrations/0043_circuittype_color.py` (+1 -1) 📝 `netbox/core/migrations/0006_datasource_type_remove_choices.py` (+1 -1) 📝 `netbox/dcim/migrations/0002_squashed.py` (+3 -3) 📝 `netbox/dcim/migrations/0003_squashed_0130.py` (+5 -5) 📝 `netbox/dcim/migrations/0131_squashed_0159.py` (+4 -4) 📝 `netbox/dcim/migrations/0160_squashed_0166.py` (+3 -3) 📝 `netbox/dcim/migrations/0167_squashed_0182.py` (+3 -3) 📝 `netbox/dcim/migrations/0183_devicetype_exclude_from_utilization.py` (+1 -1) 📝 `netbox/extras/migrations/0002_squashed_0059.py` (+4 -4) 📝 `netbox/extras/migrations/0060_squashed_0086.py` (+6 -6) 📝 `netbox/extras/migrations/0087_squashed_0098.py` (+2 -2) 📝 `netbox/extras/migrations/0099_cachedvalue_ordering.py` (+1 -1) 📝 `netbox/ipam/migrations/0001_squashed.py` (+3 -3) 📝 `netbox/ipam/migrations/0002_squashed_0046.py` (+5 -5) 📝 `netbox/ipam/migrations/0047_squashed_0053.py` (+1 -1) 📝 `netbox/ipam/migrations/0054_squashed_0067.py` (+3 -3) 📝 `netbox/ipam/migrations/0068_move_l2vpn.py` (+1 -1) _...and 7 more files_ </details> ### 📄 Description ### Fixes: #18808 After previously squashing migrations, many child migrations depending on those original migrations had not been updated to point to the new squashed migrations in `dependencies`. This caused errors when using `./manage.py sqlmigrate`. This change fixes the `dependencies` of all erroneous migrations to point to the correct squashed parent migrations. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:21:59 +01:00
adam closed this issue 2025-12-30 00:21:59 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15450