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 database migration cli commands #381

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rafaelcr
Copy link
Collaborator

Adds the following commands to the CLI:

# Runs database migrations
ordhook database migrate --config-path <path>
# Resets database contents and drops all tables
ordhook database reset --config-path <path>

These will be adopted by all bitcoin indexers soon, and will allow the API tests to run migrations before each test once it's integrated into this repo.

@rafaelcr rafaelcr requested a review from ASuciuX January 13, 2025 22:52
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 35.00000% with 26 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
components/ordhook-cli/src/cli/mod.rs 0.00% 16 Missing ⚠️
components/ordhook-core/src/db/mod.rs 58.33% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

@rafaelcr rafaelcr requested a deployment to Development-mainnet-blue January 13, 2025 23:22 — with GitHub Actions Waiting
Copy link

@ASuciuX ASuciuX left a comment

Choose a reason for hiding this comment

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

LGTM, I've also checked the test suite in:

  • components/chainhook-postgress
  • components/ordhook-core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants