Skip to content

[L1] DB migrations: rename clerk_id → external_id, add deployment_mode - #12

Open
gbram1 wants to merge 1 commit into
mainfrom
stack/pr-3/L01-db-migrations-rename-clerk-id-external-i
Open

gbram1 wants to merge 1 commit into
mainfrom
stack/pr-3/L01-db-migrations-rename-clerk-id-external-i

Conversation

@gbram1

@gbram1 gbram1 commented May 21, 2026

Copy link
Copy Markdown
Owner

Part of an AI-generated stack — level 1 of 5.
Depends on: base branch. Merges into: main.

Goal

Land the expand-side schema migrations for both SQLite and Postgres so the new columns exist before any Rust code uses them.

Risk

medium — Renaming a column is a one-way migration; the compaction_state FK fix changes an existing migration file which may confuse environments that already ran it.

Rationale

Schema migrations must precede the Rust code that references the new column names. Shipping them first gives on-call engineers time to validate the migration on staging. Reviewers should check that migration 018 (rename) is idempotent and that the compaction_state FK fix in migration 006/008 does not break environments where the old schema was already applied.

Files (6)

  • crates/streamhouse-metadata/migrations-postgres/008_compacted_topics.sql
  • crates/streamhouse-metadata/migrations-postgres/018_rename_clerk_to_external_id.sql
  • crates/streamhouse-metadata/migrations-postgres/019_deployment_mode.sql
  • crates/streamhouse-metadata/migrations/006_compacted_topics.sql
  • crates/streamhouse-metadata/migrations/016_rename_clerk_to_external_id.sql
  • crates/streamhouse-metadata/migrations/017_deployment_mode.sql

…nt_mode

Land the expand-side schema migrations for both SQLite and Postgres so the new columns exist before any Rust code uses them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant