Skip to content

v0.4.3 - three migrations a fresh install could not get past

Choose a tag to compare

@siracozmen01 siracozmen01 released this 05 Oct 19:02
· 272 commits to main since this release

Three module migrations that failed every fresh install of their module.
Upgrade if you install modules: blysis update, then update Member
profiles
, Store and Tickets from Admin > Modules.

What failed

Each of these is correct for the older database it was written for. On a new
one the reconcile has already created the final shape before migrations run,
and each tripped over that shape:

Module Migration Error
Member profiles 1.7.0 001_a_linked_game_account_names_no_game 42P01 "LinkedAccount" does not exist: 002 drops that table and the schema never declares it
Store 2.46.0 014_an_order_has_a_number_an_integrator_can_hold 42P07 "Order_number_key" already exists: the guard looked only for a constraint, while Prisma's @unique creates a unique index by that name
Tickets 1.8.0 002_a_ticket_state_is_a_row 2BP01 cannot drop type "TicketStatus": on a fresh install that is the row type of the TicketStatus table

The install itself went through and the tables were right, because the
reconcile built them, but the migrations stayed unrecorded and failed again on
every later install and every bootstrap.

The fix

Each migration now guards on what is actually there, and was run against both
the old and the fresh schema, twice each. Member profiles 1.7.1, Store 2.46.1
and Tickets 1.8.1 carry them.

An applied migration still may not change on disk. A fixed file names the
checksum of the text it replaces on a -- supersedes-checksum: line, and the
runner skips it for an install that already ran that text instead of aborting
the module. Only a checksum written there is accepted.

Image

ghcr.io/inovixi/blysis:0.4.3, also tagged 0.4, 0 and latest.