Rename PostgreSQL resources for L2VPN models #9345

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

Originally created by @jeremystretch on GitHub (Mar 11, 2024).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

Rename the following sequence tables:

  • ipam_l2vpn_export_targets_id_seq
  • ipam_l2vpn_id_seq
  • ipam_l2vpn_import_targets_id_seq
  • ipam_l2vpntermination_id_seq

As well as the following indexes & constraints:

  • ipam_l2vpn_pkey
  • ipam_l2vpn_name_5e1c080f_like
  • ipam_l2vpn_name_key
  • ipam_l2vpn_slug_24008406_like
  • ipam_l2vpn_slug_24008406_uniq
  • ipam_l2vpn_tenant_id_bb2564a6
  • ipam_l2vpn_tenant_id_bb2564a6_fk_tenancy_tenant_id
  • ipam_l2vpntermination_pkey
  • ipam_l2vpntermination_assigned_object_type_id_3923c124
  • ipam_l2vpntermination_l2vpn_id_9e570aa1
  • ipam_l2vpntermination_assigned_object_id_check
  • ipam_l2vpnterminatio_assigned_object_type_3923c124_fk_django_co
  • ipam_l2vpntermination_l2vpn_id_9e570aa1_fk_ipam_l2vpn_id

Justification

The L2VPN and L2VPNTermination models were migrated from the ipam app to the vpn app in NetBox v3.7, and their corresponding tables in the PostgreSQL database were renamed accordingly. However, Django does not automatically rename their accompanying sequence tables, indexes, or constraints.

Although retaining the original names for these resources has no functional impact, they should be renamed to match their tables to avoid potential confusion.

Originally created by @jeremystretch on GitHub (Mar 11, 2024). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes Rename the following sequence tables: * `ipam_l2vpn_export_targets_id_seq` * `ipam_l2vpn_id_seq` * `ipam_l2vpn_import_targets_id_seq` * `ipam_l2vpntermination_id_seq` As well as the following indexes & constraints: * `ipam_l2vpn_pkey` * `ipam_l2vpn_name_5e1c080f_like` * `ipam_l2vpn_name_key` * `ipam_l2vpn_slug_24008406_like` * `ipam_l2vpn_slug_24008406_uniq` * `ipam_l2vpn_tenant_id_bb2564a6` * `ipam_l2vpn_tenant_id_bb2564a6_fk_tenancy_tenant_id` * `ipam_l2vpntermination_pkey` * `ipam_l2vpntermination_assigned_object_type_id_3923c124` * `ipam_l2vpntermination_l2vpn_id_9e570aa1` * `ipam_l2vpntermination_assigned_object_id_check` * `ipam_l2vpnterminatio_assigned_object_type_3923c124_fk_django_co` * `ipam_l2vpntermination_l2vpn_id_9e570aa1_fk_ipam_l2vpn_id` ### Justification The `L2VPN` and `L2VPNTermination` models were migrated from the `ipam` app to the `vpn` app in NetBox v3.7, and their corresponding tables in the PostgreSQL database were renamed accordingly. However, Django does not automatically rename their accompanying sequence tables, indexes, or constraints. Although retaining the original names for these resources has no functional impact, they should be renamed to match their tables to avoid potential confusion.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 20:48:51 +01:00
adam closed this issue 2025-12-29 20:48:51 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9345