Version History
Every meaningful change to a diagram is captured as a version snapshot. You can browse history, compare versions, and restore — without ever losing the current state.
When snapshots are created
| Trigger | Description on snapshot |
|---|---|
| SQL import | "Imported from SQL" |
| Natural language → ERD | "Converted via AI" |
| MCP write (any tool) | "Updated via MCP" |
| Manual save | Whatever description you provide |
Day-to-day visual edits do not create a snapshot per change — that would be too noisy. Instead, you can take a manual snapshot at any meaningful checkpoint with a description like "Before payments refactor" or "Released v1.2".
Browsing history
Open the Version History panel from the sidebar. You'll see a timeline of snapshots with:
- Version number (auto-incremented)
- Description
- Creator (who made it)
- Timestamp
Click any version to see its full schema state.
Compare two versions
Pick any two versions and Ainecto shows a structural diff:
- Tables added / removed / renamed
- Columns added / removed / type changed
- Foreign keys added / removed / changed
- Index changes
The diff is computed from the JSON snapshot using jsondiffpatch and rendered as a side-by-side view.
Restore a version
Restoring is non-destructive — it creates a new snapshot from the historical state, so the latest version is preserved as part of history.
How to restore:
- Open Version History
- Click the target version
- Restore
- A new version is created at the top with the description
Restored from v{N}
Your previous (current) state is still in history if you change your mind.
Retention
Snapshot retention depends on your plan:
| Plan | Snapshots retained |
|---|---|
| Free | 10 (oldest auto-purged) |
| Pro | 50 |
| Enterprise | Unlimited |
When the limit is reached, the oldest snapshots are purged automatically. Manual snapshots and auto snapshots count toward the same limit.
Permissions
| Role | Can view history | Can restore | Can create manual snapshot |
|---|---|---|---|
| OWNER | ✓ | ✓ | ✓ |
| EDITOR | ✓ | ✓ | ✓ |
| VIEWER | ✗ | ✗ | ✗ |
Viewers don't see the version history — restore is an editing action.