Skip to content

[BREAKING] Add CLI command for database initialization#617

Open
dean-amar wants to merge 4 commits into
hyperledger:mainfrom
dean-amar:admin-db-init
Open

[BREAKING] Add CLI command for database initialization#617
dean-amar wants to merge 4 commits into
hyperledger:mainfrom
dean-amar:admin-db-init

Conversation

@dean-amar

@dean-amar dean-amar commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Type of change

  • New feature
  • Improvement (code improvement)
  • Test update
  • Documentation update
  • Breaking change

Description

  • Introduces a new committer init-db CLI command that allows administrators to initialize the database (create system tables, metadata tables, and system namespaces) as a standalone operation before starting services. The change includes a BREAKING API modification: the SetupSystemTablesAndNamespaces RPC method has been removed from the VC service as database initialization is now performed via CLI instead of gRPC.

Additional details (Optional)

  • Although the cmd/config/samples/dbinit.yaml is a duplication of the database sub-config section of the vc and query services, I think that we should separate this configuration file for further usage. We can load the database configuration from the vc or query configs, but we want to keep the init-db command independent and focused solely on database initialization without requiring service-specific configurations. This separation allows administrators to run database initialization in environments where service configs may not be available yet.

  • Usage example: committer init-db --config dbinit.yaml

Related issues

dean-amar added 4 commits June 1, 2026 20:31
…ust be executed after the database is healthy and running, and before performing any operation against the database.

Signed-off-by: Dean Amar <Dean.Amar@ibm.com>
Signed-off-by: Dean Amar <Dean.Amar@ibm.com>
Signed-off-by: Dean Amar <Dean.Amar@ibm.com>
Signed-off-by: Dean Amar <Dean.Amar@ibm.com>
@coveralls

coveralls commented Jun 1, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 91.8% (+0.3%) from 91.501% — dean-amar:admin-db-init into hyperledger:main

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.

[db] Admin DB initialisation

2 participants