ELSEIF
Your brief EB
168 stories from 89 feeds 163 clusters Refreshed 4 seconds ago next pull 20:51

DATABASES Signal 543

A zero-dependency, ultra-lightweight database time machine for SQLite

A new open-source tool lets developers rewind a SQLite database to any prior state during local development using a zero-dependency PHP watcher and a simple web UI.

WHY IT MATTERS

Engineers can instantly undo accidental data changes or schema edits without restoring from backups or restarting services. The tool works entirely on the local file system, requiring only PHP and a built-in web server, which reduces setup overhead for debugging workflows.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

The watcher daemon automatically creates timestamped snapshots of the SQLite file and its associated write-ahead log and shared memory files whenever the database changes.

02

A web interface provides visual diffs, timeline navigation with arrow keys, and one-click restore or export of any snapshot.

03

Older snapshots are pruned after fifty backups unless pinned, keeping disk usage bounded while preserving important states.

THE READ

What the cluster adds up to.

ORIGINAL ANALYSIS

The tool introduces a time-travel capability for SQLite databases that mimics scrubbing a video timeline. By running a background watcher script, every write to the database triggers a timestamped backup of the main file and its associated write-ahead log and shared memory files. Developers can then browse these snapshots through a lightweight web UI and restore the database to any chosen point with a single click.

Adopting the approach requires only a PHP 8+ interpreter and the ability to start a local web server, as the watcher and UI are self-contained with no external dependencies. Disk space is consumed by the backup directory, which retains up to fifty snapshots automatically and removes the oldest unless they are pinned. The setup cost is minimal because the same PHP binary used for development can run both the watcher and the server.

The solution is presented as an aid for local development workflows, implying it is not intended for production use or for databases accessed by multiple concurrent writers. It relies on the file system to generate notifications and to read/write backup files, so it expects the database to reside on a local disk with appropriate permissions. If those conditions are not met, the watcher may fail to create snapshots or the UI may be unable to restore a previous state.

Internationalization is built in, allowing the interface to be switched between languages such as English and Turkish without restarting the application, and new languages can be added by placing a JSON file in the lang directory. The MIT license permits reuse and modification, so teams can adapt the watcher or UI to fit their own tooling. These aspects make the project a reusable component for debugging SQLite-based applications during development.

Written by elseif from the cluster below · checked for specifics the sources never contained

THE CLUSTER

Same story, 1 feed.

ORDERED BY FIRST SEEN
Hacker News A zero-dependency, ultra-lightweight database time machine for SQLite Open ↗