Skip to content

Conversation

@jwalterss
Copy link
Contributor

@jwalterss jwalterss commented Nov 12, 2025

Goal

Add PublisherDomain table to curated-corpus database to track publisher names
associated with domain names.

  • Add PublisherDomain model to Prisma schema with fields: domainName (PK),
    publisher, createdAt, createdBy, updatedAt, updatedBy
  • Create migration that inserts 23 publisher domains from provided data
  • Migration only inserts domains that exist in ApprovedItem table (using WHERE
    EXISTS clause)
  • Export PublisherDomain type in database types

Implementation Decisions

  • Used domainName as primary key to ensure uniqueness per domain
  • Migration uses WHERE EXISTS to only insert domains that are actually used in
    ApprovedItem table
  • Set createdBy to 'migration' for seeded data
  • All standard audit fields included (createdAt, createdBy, updatedAt,
    updatedBy)

Deployment steps

  • Database migrations? Yes - migration file created and tested locally
  • Deployed to dev?
  • Secrets? No

References

JIRA ticket:

- Add PublisherDomain model to Prisma schema with fields: domainName (PK), publisher, createdAt, createdBy, updatedAt, updatedBy
- Create migration that inserts 23 publisher domains
- Migration only inserts domains that exist in ApprovedItem table
- Export PublisherDomain type in database types
This is the full set of domains from the 'domain_business_metadata' table
that were ever used on a ScheduledItem or SectionItem.
mmiermans
mmiermans previously approved these changes Nov 12, 2025
Copy link
Contributor

@mmiermans mmiermans left a comment

Choose a reason for hiding this comment

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

Approved with a minor comment. Feel free to merge once that's addressed.

@jwalterss jwalterss merged commit 02e2275 into main Nov 12, 2025
14 checks passed
@jwalterss jwalterss deleted the HNT-1223-add-PublisherDomainTable branch November 12, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants