The migrations pane

Backed by: the control-plane seam’s GET /control-plane/migrations, answered by your own Worker. Scope: migrations:read.

What it shows

Migrations is what a migration is, rolling a schema change is the walkthrough, pithy migrate is what runs them, and shared databases is why one migration can span Workers.

What is applied, what is pending and what is undeclared, per database your Worker binds. The index lists each database with how many migrations are pending, or Not read.

A migration ledger is a list of applied names, and a pending one is a name the registry has that the database does not.

PendingDeclared by this build and not applied here, in the order they would run
AppliedEvery migration in this database’s ledger, in the order it applied them
UndeclaredApplied here and not declared by this Worker

Undeclared is relative to this Worker. A shared database lists the other Worker’s migrations here, and nothing is wrong. On a database only this Worker binds, it is a corrupted chain, and a migrate run applies nothing there. Every migration names its owner: the capability’s name, Your application for your own, or No Pithy capability for a name no Pithy registry composed.

Last run is the newest group with anything still applied here: its value, when it applied, and what it applied, in order. It says whether the group is the tip of the database’s chain or buried, and when buried, what is in its way, newest first — later groups, and migrations no group claims. The tip is a position, not a promise that pithy migrate --rollback --group would run: the CLI also refuses an undeclared migration in the ledger, and keeps back or refuses a database another environment binds.

Unreadable is never empty

A database whose ledger could not be read on this call shows no lists at all, because an empty pending list would read as up to date. The other databases answer on their own.

Read once, held nowhere

The pane reads when you open it, on the current connection, and keeps nothing. The answer is not cached, not even for the screen’s minute, and leaving the pane and coming back draws it again without a second call.

A connection without migrations:read is refused by name. Scopes has how to add it to a connection made before it existed. A Worker whose @pithy-sh/core is older than 0.11 reports no migrations, and the pane says Not reported rather than drawing an empty one.

Running one is not a button here

pithy migrate is the command, and that is deliberate rather than an omission.

A migration is a schema change against production data. It belongs in the same place your other deploy steps are — a terminal, or CI — where it is reviewed, versioned and repeatable.

What the CLI does that a pane could not

It runs every visited database’s whole registry.

--worker narrows what is reported and which databases are visited. It never narrows the registry a visited database runs — because a shared database’s ledger holds both Workers’ migrations, and a partial provider reads as corrupted state.

The ordering is stable forever

A released migration is never renumbered and never edited.

A change to a migration that has run somewhere is a change that will not run there — the ledger records applied migrations by name, so removing a name a real database has recorded is a corrupted chain.

History is not edited.

The ownership stamp

A database carries one, so a second project pointed at somebody else’s database is caught rather than migrated into.

An unstamped database is adopted on first migrate; your own is a no-op.

Every migration has a tested down

Which is what makes a rollback a plan rather than a hope.

Where a pending migration shows up elsewhere

pithy doctor reports it and names the command.

pithy deploy refuses rather than shipping a Worker whose code expects a column that is not there.

Local and remote are the same run

The registry, the ordering and the per-database runs are identical everywhere.

Only the driver differs — locally through Miniflare against the same store wrangler dev reads, remotely over the D1 API. You pass no ids.

ESC