circus/crates/common/migrations
NotAShelf 959aba0933
fc-common: use btree index for build_outputs.path in db schema
Btree supports NULL values and provides better flexibility
than hash index for nullable columns.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ida28ef6f88683c360e6f405efca435af6a6a6964
2026-02-28 23:56:24 +03:00
..
0001_schema.sql fc-common: use btree index for build_outputs.path in db schema 2026-02-28 23:56:24 +03:00
0002_example.sql fc-common: consolidate database migrations; simplify 2026-02-28 12:18:13 +03:00
README.md fc-common: consolidate database migrations; simplify 2026-02-28 12:18:13 +03:00

Database Migrations

This directory contains SQL migrations for the FC database.

Migration Files

  • 0001_schema.sql: Full schema, all tables, indexes, triggers, and views.
  • 0002_example.sql: Example stub for the next migration when we make a stable release.

Running Migrations

The easiest way to run migrations is to use the vendored CLI, fc-migrate. Packagers should vendor this crate if possible.

# Run all pending migrations
fc-migrate up postgresql://user:password@localhost/fc_ci

# Validate current schema
fc-migrate validate postgresql://user:password@localhost/fc_ci

# Create a new migration
fc-migrate create migration_name