~dricottone/huttese#4: 
Database corrupt at initialization

On deploying this site, I ran into an issue with the todo.sr.ht database. It seems the migrations (using alembic) are a bit brittle.

I attempted to do this the 'right way' by downgrading to the latest version that seemed to work (e3427af07c4e) then re-upgrading to head. The migrations hit several roadblocks that required manual inspection and re-stamping. Re-upgrading to head went similarly.

The process looked like: Run migrations until an exception is raised up alembic, inspect the database to verify it contains all required fields/indices/types, re-stamp the database version, and repeat.

I may have ended up with a superset of the correct fields. Hopefully that won't cause further corruption.

Leaving this open until either (1) I can fix the migrations or (2) on re-deployment I run into no similar issues and am confident that I won't run into them again.

Status
REPORTED
Submitter
~dricottone
Assigned to
No-one
Submitted
2 years ago
Updated
2 years ago
Labels
No labels applied.

~dricottone 2 years ago

The traceback is from a goroutine (so it's unreadable) but the error message is:

pq: constraint "subscription_ticket_participant_uq" for table "ticket_subscription" does not exist