Deployment Portal
Migrations
cmd/migrate · run before roll out, once per release
Schema
0013latestapplying to production
Drift
0environmentsstaging = production − 0
Longest lock
1.1s0009 · partition
Irreversible
3of 13no down.sql
Migrations by environment
| Version | Name | Production | Staging | Preview | Took | Lock | Reversible |
|---|---|---|---|---|---|---|---|
| 0013 | projects_search_tsvector | applying | applied | — | 1200 ms | 0.3 s | down.sql |
| 0012 | projects_add_archived_at | applied | applied | applied | 41 ms | — | down.sql |
| 0011 | org_invites_token_hash | applied | applied | applied | 88 ms | — | no |
| 0010 | river_v6 | applied | applied | applied | 302 ms | — | no |
| 0009 | audit_events_partition | applied | applied | applied | 1204 ms | 1.1 s | no |
| 0008 | settings_history | applied | applied | applied | 27 ms | — | down.sql |
0013_projects_search_tsvector
up.sql-- adds a generated tsvector and a GIN index; concurrently, no long lock ALTER TABLE projects ADD COLUMN search tsvector GENERATED ALWAYS AS (to_tsvector('simple', name || ' ' || coalesce(description, ''))) STORED; CREATE INDEX CONCURRENTLY projects_search_idx ON projects USING gin (search);
Policy
what ship checks before it runs a migration- Runs once per release, on one instance, before the roll out starts.
- Fails the release if a lock is not acquired in 10 s; nothing is rolled out.
- Migrations that drop columns or tables need a second approval.
- 3 migrations have no down.sql; a rollback of those releases keeps the schema.