Skip to content

Row history ​

A MariaDB table created WITH SYSTEM VERSIONING (MariaDB 10.3 and later) keeps every earlier version of every row: an UPDATE stores the old version before writing the new one, and a DELETE keeps the row it removes. NabuSQL lets you browse that history.

Right-click such a table in the sidebar and choose Row history. The entry only appears on system-versioned tables — MySQL has none, so on MySQL you never see it.

Two views ​

ViewWhat it shows
All row versionsEvery version of every row, newest first, each with the time span it was valid
As of a momentThe table exactly as it stood at the date and time you pick

The first two columns are Valid from and Valid to, followed by the table's own columns. The version that is still current has no end: its Valid to reads current and the row is highlighted.

Server time

The moment you pick is read in the server's time zone, as are the times in both columns. If the server runs in another time zone than your computer, enter the server's time.

Reading the history ​

  • A row changed three times appears four times — the original and each change.
  • A deleted row is still there, with a Valid to time and no current version.
  • INVISIBLE columns stay hidden, as they do in the data grid.
  • The view is read-only: history cannot be edited.
  • 500 versions are shown per page; ‹ and › move between pages, and the toolbar shows the total.

Supported kinds of versioning ​

All three forms MariaDB offers are recognised:

FormHow it is declaredValidity columns
PlainCREATE TABLE … WITH SYSTEM VERSIONINGMariaDB's hidden ROW_START / ROW_END
Own period columns… GENERATED ALWAYS AS ROW START / ROW END plus PERIOD FOR SYSTEM_TIME (a, b)Your columns, visible or INVISIBLE
Transaction-precisePeriod columns of type BIGINT UNSIGNEDTransaction IDs instead of times

Making a table versioned ​

Run it in the SQL editor:

sql
ALTER TABLE invoice ADD SYSTEM VERSIONING;

History starts from that moment; earlier changes were never recorded.

The structure editor keeps working on versioned tables. MariaDB refuses any ALTER on them unless system_versioning_alter_history is KEEP, so NabuSQL sets that for its own connections; the existing history is kept as it is.

Size and clean-up ​

History is never removed by itself, so a table that changes often grows. To drop versions older than a given moment:

sql
DELETE HISTORY FROM invoice BEFORE SYSTEM_TIME '2026-01-01 00:00:00';

Backups, transfers and renames ​

  • A backup or dump carries the current rows, and the restored table is versioned again — but its history starts afresh, as with mysqldump.
  • Renaming the database moves each table whole, history included.
  • Data transfer copies the current rows into an ordinary table; add SYSTEM VERSIONING on the target afterwards if you want it there too.