Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

Latest commit

 

History

History
56 lines (37 loc) · 972 Bytes

File metadata and controls

56 lines (37 loc) · 972 Bytes

PostgreSQL

PostgreSQL is used for metadata storage (everything but objects and packs). It runs in a Docker container named postgres.

Configuration

  • Version: 18.1
  • Port: 5432 (Mapped to host port 5432)
  • Database: git-server
  • User: minerva
  • Password: m1n3rv@

Schema Management

We use dbmate for database schema migrations.

Run Migrations:

make ms-migrate

Code Generation

We use sqlc to generate Go code from SQL queries.

Generate Code:

make ms-gen

Common Commands

# Connect to database in interactive mode:
./devenv/bin/psql

# List databases:
./devenv/bin/psql -l

# List tables:
./devenv/bin/psql -c "\dt"

# List columns of a table:
./devenv/bin/psql -c "\d+ table_name"

# List indexes of a table:
./devenv/bin/psql -c "\di+ table_name"

# List sequences of a table:
./devenv/bin/psql -c "\ds+ table_name"