[PR #2604] [MERGED] Refactor Extras Migration Version Check #12411

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/2604
Author: @tyler-8
Created: 11/20/2018
Status: Merged
Merged: 11/26/2018
Merged by: @jeremystretch

Base: developHead: db_version_check


📝 Commits (6)

  • c7772e2 Add constant for DB_MINIMUM_VERSION
  • 0935df4 Refactor verify_postgresql_version to use Django connection pg_version method for comparing versions.
  • ede0cc8 Remove StrictVersion import
  • 6c26bd7 Remove DB_MINIMUM_VERSION as not necessary in constants.
  • 3ebea26 Define DB_MINIMUM_VERSION locally to freeze to migration.
  • 9175c67 Refactor database version verification to use django builtin methods.

📊 Changes

2 files changed (+14 additions, -17 deletions)

View changed files

📝 netbox/extras/migrations/0001_initial_squashed_0010_customfield_filter_logic.py (+7 -9)
📝 netbox/extras/migrations/0008_reports.py (+7 -8)

📄 Description

Fixes: #2603

This adds a constant (just in case of future necessity) for the minimum required DB version, as well as refactors the function to do DB version checking using built-in Django methods rather than a raw query.


🔄 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/2604 **Author:** [@tyler-8](https://github.com/tyler-8) **Created:** 11/20/2018 **Status:** ✅ Merged **Merged:** 11/26/2018 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `db_version_check` --- ### 📝 Commits (6) - [`c7772e2`](https://github.com/netbox-community/netbox/commit/c7772e289f340af82ca8a7e6f45b09bad9a3692e) Add constant for DB_MINIMUM_VERSION - [`0935df4`](https://github.com/netbox-community/netbox/commit/0935df47612cd9b5f9407432d881bdee6f37ec0a) Refactor verify_postgresql_version to use Django connection pg_version method for comparing versions. - [`ede0cc8`](https://github.com/netbox-community/netbox/commit/ede0cc8694b703b0ac2cf10c7efcb06146acd691) Remove StrictVersion import - [`6c26bd7`](https://github.com/netbox-community/netbox/commit/6c26bd71bc70eeb9bc10f7113912e0fd5a015540) Remove DB_MINIMUM_VERSION as not necessary in constants. - [`3ebea26`](https://github.com/netbox-community/netbox/commit/3ebea26a9f339da568a3dcac5796e0c25ff918df) Define DB_MINIMUM_VERSION locally to freeze to migration. - [`9175c67`](https://github.com/netbox-community/netbox/commit/9175c6750aea51665ffc120258268440e2fe3372) Refactor database version verification to use django builtin methods. ### 📊 Changes **2 files changed** (+14 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/migrations/0001_initial_squashed_0010_customfield_filter_logic.py` (+7 -9) 📝 `netbox/extras/migrations/0008_reports.py` (+7 -8) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be opened for approval prior to filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. Please indicate the relevant feature request or bug report below. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ACCEPTED BUG REPORT OR FEATURE REQUEST, IT WILL BE MARKED AS INVALID AND CLOSED. --> ### Fixes: #2603 This adds a constant (just in case of future necessity) for the minimum required DB version, as well as refactors the function to do DB version checking using built-in Django methods rather than a raw query. --- <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 22:21:21 +01:00
adam closed this issue 2025-12-29 22:21:21 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12411