Summary
CONTRIBUTING.md covers basic dev setup but omits three critical workflows for contributors: (1) how to create a new database migration and update the .sqlx offline metadata, (2) how to run the Postgres-backed tests that are marked #[ignore] by default, and (3) how to update the contract_summaries trigger or other schema objects and verify the change. A contributor unfamiliar with SQLx will spend significant time discovering these workflows.
Expected Behavior
CONTRIBUTING.md should document the full workflow for schema changes and database-backed testing.
Proposed Solution
Add a Database changes section to CONTRIBUTING.md covering:
- How to create a new migration file (
sqlx migrate add <name>)
- How to apply it locally (
cargo run -p lumenqraph-indexer)
- How to regenerate
.sqlx offline metadata (cargo sqlx prepare)
- How to run the ignored Postgres-backed tests (
TEST_DATABASE_URL=... cargo test -- --ignored)
Affected Files
Summary
CONTRIBUTING.mdcovers basic dev setup but omits three critical workflows for contributors: (1) how to create a new database migration and update the.sqlxoffline metadata, (2) how to run the Postgres-backed tests that are marked#[ignore]by default, and (3) how to update thecontract_summariestrigger or other schema objects and verify the change. A contributor unfamiliar with SQLx will spend significant time discovering these workflows.Expected Behavior
CONTRIBUTING.mdshould document the full workflow for schema changes and database-backed testing.Proposed Solution
Add a
Database changessection toCONTRIBUTING.mdcovering:sqlx migrate add <name>)cargo run -p lumenqraph-indexer).sqlxoffline metadata (cargo sqlx prepare)TEST_DATABASE_URL=... cargo test -- --ignored)Affected Files
CONTRIBUTING.md