Skip to content

Fix forge instance column types on PostgreSQL - #922

Merged
gabriel-samfira merged 1 commit into
cloudbase:mainfrom
gabriel-samfira:account-for-psql
Oct 15, 2026
Merged

gabriel-samfira merged 1 commit into
cloudbase:mainfrom
gabriel-samfira:account-for-psql

Conversation

@gabriel-samfira

@gabriel-samfira gabriel-samfira commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

The 0003 stubs declared their columns without a type. The real models derive it from the key each column references, but a stub has no relation to derive from, so PostgreSQL got text columns that cannot be compared to the uuid and varchar(64) keys they point at, and 0008 fails with "operator does not exist: text = uuid". 0007a converts them before 0008 runs.

The parity test missed this because it compared column names only, on SQLite alone. It now records column types and re-runs every migration over a current PostgreSQL schema, which must leave it unchanged. 0010 needed a rerun guard to survive that, which it wanted anyway.

Fixes #920

The 0003 stubs declared their columns without a type. The real models
derive it from the key each column references, but a stub has no relation
to derive from, so PostgreSQL got text columns that cannot be compared to
the uuid and varchar(64) keys they point at, and 0008 fails with "operator
does not exist: text = uuid". 0007a converts them before 0008 runs.

The parity test missed this because it compared column names only, on
SQLite alone. It now records column types and re-runs every migration over
a current PostgreSQL schema, which must leave it unchanged. 0010 needed a
rerun guard to survive that, which it wanted anyway.
@gabriel-samfira
gabriel-samfira merged commit ae281e3 into cloudbase:main Oct 15, 2026
5 checks passed
cbartz added a commit to canonical/github-runner-operators that referenced this pull request Oct 15, 2026
…bases (#429)

Pin GARM to the merge of cloudbase/garm#922. PostgreSQL databases that
went through GARM's migration 0003 have text forge_instance_id columns,
so migration 0008 failed with "operator does not exist: text = uuid" and
GARM did not start (cloudbase/garm#920). The new migration 0007a
converts those columns before 0008 runs.
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.

Migration 0008 fails on PostgreSQL databases upgraded through 0003: operator does not exist: text = uuid

1 participant