You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A database moved from the fork back to upstream can skip upstream migrations numbered 1.5.0 or lower #86
This issue described both directions, and #75 fixes one of them: a database with upstream's 1.5.0 row moving to the fork. The other still holds: a database the fork created or migrated records 1.5.0 (EventStore.Sql.Init inserts (1, 5, 0), and the fork's migrate adds a 1.5.0 row), while upstream's migrate runs only versions strictly greater than the highest one recorded. If upstream ships its own v1.5.0.sql, a database moved from the fork back to upstream would skip it and still report itself migrated, so the database never gets that migration's changes.
Severity: depends on that migration: the database silently lacks its changes while reporting itself migrated. Likelihood: low: only if upstream ships a migration numbered 1.5.0 or lower that differs from the fork's, and a database moves back.
The same rule makes the skip wider than 1.5.0, going by the code (I only ran 1.5.0): moving a database back can skip any unapplied upstream migration numbered 1.5.0 or lower, a future 1.4.x one included, while one above 1.5.0 passes the check.
How I checked it
I checked this with a stand-in, not a real upstream release: upstream's EventStore.Tasks.Migrate, which is the fork's code before #75, compiled under another name, with a v1.5.0.sql that adds a marker column. On a database initialised by the fork at a2ce825, and on a database shaped like upstream 1.4 and then migrated by the fork, it printed "The EventStore database is already migrated." and added no column (3 of 3). On a control shaped like upstream 1.4 alone, it ran v1.5.0 and added the column.
Do you plan to bring this migration upstream as 1.5.0, or keep the fork's version numbers separate from upstream's?
Activity