Skip to content

Move the domain default content-guard into a dedicated table - #8321

Open
YasenT wants to merge 1 commit into
pulp:mainfrom
YasenT:domain-default-content-guard-table
Open

YasenT wants to merge 1 commit into
pulp:mainfrom
YasenT:domain-default-content-guard-table

Conversation

@YasenT

@YasenT YasenT commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Domain.default_content_guard was a ForeignKey on the Domain row. Store the mapping in a new DomainDefaultContentGuard table instead, scoped to the domain through pulp_domain, so it lives next to the content-guard it references. This avoids a cross-database relation once domains can live in separate databases.

The REST API is unchanged. Domain.default_content_guard is now a read-only property, and Domain.set_default_content_guard() sets or clears it. Existing values are migrated, and deleting a content-guard still clears it as the domain's default.

Closes #8303

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

See: Pull Request Walkthrough

Domain.default_content_guard was a ForeignKey on the Domain row. Store the
mapping in a new DomainDefaultContentGuard table instead, scoped to the
domain through pulp_domain, so it lives next to the content-guard it
references. This avoids a cross-database relation once domains can live in
separate databases.

The REST API is unchanged. Domain.default_content_guard is now a read-only
property, and Domain.set_default_content_guard() sets or clears it.
Existing values are migrated, and deleting a content-guard still clears it
as the domain's default.

Closes pulp#8303
@YasenT

YasenT commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

/retest

This branch has not been deployed

No deployments
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.

Move Domain's default content guard into a dedicated table (multi-db prep)

1 participant