Docs/Configuration/History & snapshot tables
OSS

History & snapshot tables

DBLift keeps its own state in the database it manages. Two tables, both renameable, both created on first use.

Keys

These sit at the top level of the file, not inside a section, and can each be set from the environment.

KeyDefaultWhat it holds
history_tabledblift_schema_historyOne row per applied migration: version, description, type, checksum, who applied it, when, how long it took, and whether it succeeded.
snapshot_tabledblift_schema_snapshotsCaptured schema snapshots, each with its checksum and the model it recorded.
max_snapshots1How many snapshots to retain. When a capture pushes the count past this, the oldest is deleted.

Renaming is a migration in itself

Changing history_table against a database that already has history does not move the rows. DBLift will find no history under the new name and treat every applied migration as pending. Rename the table in the database in the same change.

On this page