platform db group manages the master database schema, and platform registry inspects the live registry served to validators. Their group help is Database helpers and Registry helpers respectively (base/src/platform_network/cli_app/main.py:62-63).
Database commands
platform db migrate — upgrade the schema to head
platform db migrate — upgrade the schema to head
Applies all pending Alembic migrations, upgrading the master database to The underlying helper upgrades to revision
head (base/src/platform_network/cli_app/main.py:922-927). The runtime database URL comes from database.url in your config (base/src/platform_network/cli_app/main.py:926-927).head by default (base/src/platform_network/db/migrations.py:21-26). A matching downgrade helper targets -1 (one revision back) but is not exposed as a CLI command (base/src/platform_network/db/migrations.py:29-34).platform db revision — autogenerate a migration
platform db revision — autogenerate a migration
Generates a new Alembic revision with
autogenerate=True from the current models (base/src/platform_network/cli_app/main.py:930-940).Registry command
platform registry print — dump the live registry as JSON
platform registry print — dump the live registry as JSON
Fetches the active challenge registry from
validator.registry_url and prints it as indented JSON (base/src/platform_network/cli_app/main.py:943-948).Database tables
The master schema is defined as SQLAlchemy models (base/src/platform_network/db/models.py). platform db migrate creates and maintains these tables.
Challenge status values
Thechallenges.status column uses the ChallengeStatus enum (base/src/platform_network/db/models.py:30-36).
Related
Database architecture
The schema and tables these migrations create and maintain.
Proxy API
The public
/v1/registry read this CLI mirrors.