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
[Bug]: Updates from official 0.0.46-preview.2909 fail: migration 61 renumbered (PeerLinks → PullRequestReviewGuides), no upgrade path #21284
I included enough detail to reproduce or investigate the problem.
Area
Server: persistence / migrations / self-update
Steps to reproduce
Run the official build 0.0.46-preview.20261010.2909 (tag v0.0.46-preview.20261010.2909, commit 01cd49f65d2c) on Linux as the managed server. It applies 061_PeerLinks, so effect_sql_migrations records (61, 'PeerLinks').
Update to any newer 0.1.1 build. Tried: 0.1.1-nightly.20261016.3190, 0.1.1-nightly.20261016.3203, 0.1.1-preview.20261017.3254 and 0.1.1-preview.20261018.3300. 3327 contains no migration changes relative to 3300.
Expected behavior
There is an upgrade path from an official build's migration history. Newer builds renumbered the migrations: on main, 61 is PullRequestReviewGuides, and the 3300 binary has 64_PeerLinks. The migrator should recognise that 61/PeerLinks was already applied and run the missing migrations 61–63.
Actual behavior
The candidate exits with code 1 on startup, and the service launcher rolls back to 2909 (status: rolled-back, reason: candidate-exited:1). This has happened on every update since 2026-10-16:
MigrationError: This database's migration history would skip required schema migrations: 61_PullRequestReviewGuides (recorded: PeerLinks). The migrator skips every id up to the highest recorded id (61), regardless of name. It was probably written by a different build. Start the build that wrote it, or report this migration history so an upgrade path can be added.
at assertV2MigrationsCanRun
at runMigrations
apps/server/src/persistence/Migrations at 01cd49f (2909) has 061_PeerLinks.ts. On current main it has 061_PullRequestReviewGuides.ts, 062_ThreadFailureLookupIndex.ts and 063_DropUnusedV1Projections.ts.
Impact
The server can't move past 2909: every new build fails and rolls back. Each attempt also causes about a minute of downtime, during which running threads are interrupted. statev2.sqlite is about 4 GB with active history, so recreating it isn't an option, and we would rather not hand-edit migration rows. 063_DropUnusedV1Projections is destructive, and PeerLinks would be re-applied.
Version or commit
Active: 0.0.46-preview.20261010.2909 (01cd49f). Failing: 3190, 3203, 3254 and 3300; 3327 contains no migration changes relative to 3300.
Environment
Linux x64 (Ubuntu, kernel 6.8). Headless managed server via t3 __service-launcher under a systemd user service, T3 Connect relay.
Logs or stack traces
See above. The service launcher state records targetVersion: 0.1.1-preview.20261018.3300, status: rolled-back, reason: candidate-exited:1.
A supported recovery path would help, either a name-aware remap in the migrator or documented manual steps.
Resolved on our side with 0.1.1-preview.20261019.3339. That build moved PeerLinks to 064_PeerLinks.ts, which is byte-identical to the 2909 061_PeerLinks.ts and uses CREATE TABLE IF NOT EXISTS, so this manual path was safe:
Took a consistent backup of statev2.sqlite (VACUUM INTO).
Deleted the single row (61, 'PeerLinks') from effect_sql_migrations.
Updated to 3339. Migrations 61–66 applied: 064 was a no-op on the existing table and 065 added fenced. The update was committed with no MigrationError.
Leaving this here for anyone else upgrading from 0.0.46-preview.2909. A name-aware reconcile like reconcileV2PreviewMigration for 61/PeerLinks would make this automatic. Closing.
Activity
lebasoft commentedon Oct 19, 2026
Resolved on our side with 0.1.1-preview.20261019.3339. That build moved
PeerLinksto064_PeerLinks.ts, which is byte-identical to the 2909061_PeerLinks.tsand usesCREATE TABLE IF NOT EXISTS, so this manual path was safe:statev2.sqlite(VACUUM INTO).(61, 'PeerLinks')fromeffect_sql_migrations.fenced. The update was committed with no MigrationError.Leaving this here for anyone else upgrading from 0.0.46-preview.2909. A name-aware reconcile like
reconcileV2PreviewMigrationfor61/PeerLinkswould make this automatic. Closing.