Skip to content

Comments

[fix] Modify unique constraints from PortRequests entity#122

Merged
saokiritoni merged 1 commit intodevelopfrom
feat/#118-add-port-request-table
Sep 2, 2025
Merged

[fix] Modify unique constraints from PortRequests entity#122
saokiritoni merged 1 commit intodevelopfrom
feat/#118-add-port-request-table

Conversation

@kwdahun
Copy link
Contributor

@kwdahun kwdahun commented Sep 2, 2025

🌱 관련 이슈

🌱 작업 사항

  • 다른 서버 도메인이더라도 (LAB/FARM이 다르더라도) port_number의 unique constraint에 의해 같은 포트를 기록할 수 없는 데이터베이스 구조 수정
  • rsgroup_id를 외래키로 가져와서 (rsgroup_id, port_number)를 composite unique constraint로 구성

@kwdahun kwdahun self-assigned this Sep 2, 2025
@kwdahun kwdahun requested a review from a team as a code owner September 2, 2025 12:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modifies the unique constraint on the PortRequests entity to allow the same port number to be used across different resource groups. The change addresses a database constraint issue where different server domains (LAB/FARM) couldn't use the same port numbers.

  • Removes the unique constraint from the port_number column alone
  • Introduces a composite unique constraint on (port_number, rsgroup_id) combination
  • Adds a new ManyToOne relationship with ResourceGroup entity

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@saokiritoni
Copy link
Member

굿 !

@saokiritoni saokiritoni merged commit 61715ad into develop Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] Add port usage table per request (PortRequests table)

2 participants