local_schema_migrations Client SQLite table
The local schema migration ledger: one row per recorded step of localSchemaMigrations, the baseline included. A database whose ledger runs past this build's newest step is refused as ahead, and one that names a different step at some version is refused as diverged (localSchemaState).
Declared in packages/client-sdk/src/data/sqlite/migrations/migrateLocalSchema.ts
Columns
versioninteger- primary key
- not null
The step's number. Steps are numbered from 1 (the baseline) without gaps.
nametext- not null
The step's name, in lowercase snake_case.
applied_atinteger- not null
When the step was recorded, in milliseconds since the epoch. A fresh database records every step at creation without running it.
DDL
The statements the client runs to create this table and its indexes.
CREATE TABLE IF NOT EXISTS "local_schema_migrations" ("version" INTEGER PRIMARY KEY NOT NULL, "name" TEXT NOT NULL, "applied_at" INTEGER NOT NULL);