Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add contenthash table #228

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

feat: add contenthash table #228

wants to merge 9 commits into from

Conversation

pikonha
Copy link
Contributor

@pikonha pikonha commented Oct 10, 2024

contenthash table

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Description

This pull request adds a new contenthash table to decouple content hash storage from the domains table. This change improves the database structure and allows for more flexible management of content hashes.

Key Changes:

  1. Created a new Contenthash entity in packages/gateway/src/entities/index.ts.
  2. Updated the PostgresRepository in packages/gateway/src/repositories/postgres.ts to handle the new Contenthash entity:
    • Added setContentHash method to upsert content hash data.
    • Modified getContentHash method to query the new Contenthash table.
    • Updated getSubdomains method to include content hash data.
  3. Adjusted the content hash handlers in packages/gateway/src/handlers/contenthash.ts to work with the new table structure.

Related Issue

#161

Changes

  • New feature implementation
  • Bug fix
  • Code refactoring
  • Documentation update
  • Other (please specify)

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

@pikonha pikonha self-assigned this Oct 10, 2024
@pikonha pikonha linked an issue Oct 10, 2024 that may be closed by this pull request
4 tasks
@pikonha pikonha marked this pull request as ready for review October 14, 2024 18:51
@pikonha pikonha added the enhancement New feature or request label Oct 14, 2024
@pikonha pikonha added this to the Database Resolver on mainnet milestone Oct 14, 2024
@pikonha pikonha removed the request for review from LeonardoVieira1630 October 14, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

store contenthash on its own table
1 participant