[PR #13747] [MERGED] 13745 device type migration #14244

Closed
opened 2025-12-29 23:23:23 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/13747
Author: @arthanson
Created: 9/12/2023
Status: Merged
Merged: 9/18/2023
Merged by: @jeremystretch

Base: developHead: 13745-device-type-migration


📝 Commits (3)

  • f3cc8d5 13745 update migrations to use batch_size
  • 1c6c642 13745 update migrations to use subquery update
  • f7d3cc8 13745 refactor and update other counter migrations

📊 Changes

6 files changed (+47 additions, -104 deletions)

View changed files

📝 netbox/dcim/migrations/0176_device_component_counters.py (+11 -36)
📝 netbox/dcim/migrations/0177_devicetype_component_counters.py (+11 -36)
📝 netbox/dcim/migrations/0178_virtual_chassis_member_counter.py (+2 -6)
📝 netbox/utilities/counters.py (+19 -1)
📝 netbox/utilities/management/commands/calculate_cached_counts.py (+2 -19)
📝 netbox/virtualization/migrations/0035_virtualmachine_interface_count.py (+2 -6)

📄 Description

Fixes: #13745

Optimize counter field migration on DeviceType for large databases.


🔄 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/13747 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 9/12/2023 **Status:** ✅ Merged **Merged:** 9/18/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `13745-device-type-migration` --- ### 📝 Commits (3) - [`f3cc8d5`](https://github.com/netbox-community/netbox/commit/f3cc8d5422b6a8234e7cf72c2fc6fa731d868739) 13745 update migrations to use batch_size - [`1c6c642`](https://github.com/netbox-community/netbox/commit/1c6c642bd96b28f63510e3bb5b979709836d2a0b) 13745 update migrations to use subquery update - [`f7d3cc8`](https://github.com/netbox-community/netbox/commit/f7d3cc88a57a38d26364e4a2c99ad691651fc225) 13745 refactor and update other counter migrations ### 📊 Changes **6 files changed** (+47 additions, -104 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/migrations/0176_device_component_counters.py` (+11 -36) 📝 `netbox/dcim/migrations/0177_devicetype_component_counters.py` (+11 -36) 📝 `netbox/dcim/migrations/0178_virtual_chassis_member_counter.py` (+2 -6) 📝 `netbox/utilities/counters.py` (+19 -1) 📝 `netbox/utilities/management/commands/calculate_cached_counts.py` (+2 -19) 📝 `netbox/virtualization/migrations/0035_virtualmachine_interface_count.py` (+2 -6) </details> ### 📄 Description ### Fixes: #13745 Optimize counter field migration on DeviceType for large databases. --- <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-29 23:23:23 +01:00
adam closed this issue 2025-12-29 23:23:23 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14244