Schemity re-syncs a reverse-engineered ERD against the live database every time you open it, preserving your layout - the diagram is a living view of the database, not a snapshot. That matters because the most common fate of a database diagram is to go stale: the schema keeps evolving, the diagram doesn’t, and after a few sprints the ERD is worse than useless - it documents a database that no longer exists.

What happens to my diagram when the database schema changes?

For a diagram created from a live connection (see Reverse-Engineer an Existing Database), Schemity re-syncs the ERD against the database and maps your existing diagram onto the fresh schema:

  • Existing entities keep their layout - positions, relationship shapes, and colors stay exactly where you arranged them.
  • Relationship lines keep their routes even when a foreign key is renamed - an ORM names constraints its own way (Django hashes them, GORM prefixes fk_), so a relation is matched by the columns it joins, not only by its constraint name.
  • New entities simply appear on the diagram, ready to drag into place on The ERD Canvas.
  • Dropped entities, fields, and relationships are removed - if it’s gone from the database, it’s gone from the ERD.
  • Virtual relations are kept - a virtual relation exists only in the diagram, so re-sync restores it onto the fresh entities with its routing, unless its columns are gone or a real foreign key now covers them.

You never re-import into a randomly re-arranged diagram, and you never maintain two versions of the truth by hand. Re-sync and Refresh work on Schemity Free.

How do I re-sync the ERD with my database?

  • Automatically on open. Every time you open a diagram that has a live connection, Schemity pulls the latest schema and applies it, so a change made through another tool shows up the moment you open the diagram. Opening the ERD is refreshing the documentation.
  • On demand with Refresh. Right after a migration ran outside Schemity - an ORM’s, a teammate’s, an AI agent’s - use Refresh from the Reset ERD dropdown, press Cmd+Shift+R (Ctrl+Shift+R on Windows and Linux), or run it from the command palette. It re-reads the database onto the diagram on screen and keeps the edits you have not saved.
  • Start over with Reset ERD. Reset ERD (Cmd+R) re-reads the database onto the diagram as it was last saved and discards unsaved edits. It asks first, because it cannot be undone.

What is the difference between Refresh and Reset ERD?

Both pull the fresh schema; they differ in what they merge it onto.

RefreshReset ERD
Merges ontoThe diagram on screen; your unsaved edits are keptThe diagram as last saved
ResultOne unsaved change: Save commits it, Undo takes it backYour edits are discarded and the undo history cleared; if the database changed since the last save, that is left as one unsaved change, as when you open the diagram
Use it whenA migration ran outside Schemity and you want to see itYou want to throw away what you changed since the last save

Refresh is the everyday one. Draw a new table on the connected diagram - it wears a dashed border because the database does not have it yet - let your ORM or coding agent create it, then Refresh: the database confirms it, and the dashed draft turns solid exactly where you drew it. Tables the database added that the diagram did not have arrive placed clear of the rest, with a solid outer ring on the canvas and their own colour on the minimap, so you can find and arrange them on a large diagram until you save; a table you drew that the database does not have yet stays where it is, still dashed, and a table the database dropped is removed unless you changed it. History lists what the refresh changed before you save it.

What happens to my unsaved edits when I Refresh?

They stay. Refresh is a three-way merge between the database as Schemity last read it, your diagram, and the database now:

  • Only the database changed it - the database’s version comes in.
  • Only you changed it - your version stays, as a pending change for the next save. That covers a column you added, retyped, renamed or deleted, a key or index you changed, and a table you drew or deleted.
  • Both changed the same thing - your version stays and a notice names the conflict, for example orders.status (the database changed it too). The database still has its own version; the migration SQL diff shown at save is the statement that would overwrite it, so you read it before anything runs.

A rule the database prints in its own words is not a change: a CHECK you drew as IN (...) or BETWEEN and the database stores as = ANY (ARRAY[...]) or two comparisons counts as the same rule, and so does a default spelled false on one side and FALSE on the other.

The merge works one column, key, index and table option at a time, so a teammate’s new column on orders arrives beside the column you just added there. Two cases are decided for the whole table: a table you renamed that the database also changed stays yours, and a table you drew that the database now has takes the database’s definition, which is what the draw-then-implement loop above relies on. Undo takes the whole Refresh back.

How do I see what changed in the database?

When opening a diagram or a Refresh changes it, the merge stays unsaved, one undo step back to the file as you last saved it, and a Database changed button appears in the canvas’s top-right corner. Click it to see what the database changed drawn on the change preview (your own unsaved edits are not listed): added tables with a green border, removed tables with a red one, and added, dropped, and changed columns tinted on the tables that stay. Removed tables are drawn where they were, which matters because the diagram itself no longer has them. The preview also lists each change in words, such as “Table orders dropped”. It has no SQL, since nothing will run. The change preview is part of Schemity Pro; on Schemity Free the button lists the same changes in words.

The button stays until you save, undo the merge, or reset the diagram. Saving is what accepts the database’s version; undo puts the diagram back the way it was, and the database is never touched either way.

Can I connect a design I drew offline to a database?

Yes. Connect an offline design to a database that already has tables, or point a connected diagram at another database, and Schemity merges instead of replacing: the database’s schema arrives wearing your design, with positions, sizes, colors, legends, and relation routes kept for every table the database has. The merged diagram opens as one unsaved change, so closing without saving leaves the file as it was. The database type of a diagram is fixed once it exists - a PostgreSQL design cannot be pointed at MySQL.

Here the database decides what exists: tables only the design has are dropped from the merged result. If the design still holds plans the database does not have yet - contexts not implemented - duplicate the design’s JSON file and connect the copy, so the original keeps the plan. ERD-First Database Design walks through that workflow on a 60-entity schema.

What happens if the database is unreachable?

The diagram stays editable. A dropped VPN, a stopped container, or a database that is simply down does not lock you out of your own file:

  • Saving still works for changes that need no migration. Recoloring an entity or moving it is a diagram change, and the migration SQL diff is computed from the ERD and the schema Schemity already holds - not by querying the database - so a save with an empty diff never touches the connection.
  • Re-sync checks the connection first. If the database cannot be reached, Schemity says so instead of prompting you to apply something, and the diagram and its full undo history are left exactly as they were. You are never dropped onto a loading screen that never resolves.

Structural changes still need the database, because only a successful migration makes them real - see the dashed border rule below. Everything else keeps working offline, which is the point of a desktop app: the file is on your machine, so your ability to work on it should not depend on a network.

How do I carry a layout over from another diagram?

New entities arrive unarranged, but if their arrangement already exists in another diagram - say the design you drew before implementation - you do not have to redo it. To carry a whole design over at once, connect a copy of it (see the section above). To carry over a few entities, select them in the other tab, copy, and paste into the connected diagram. Paste is merge-aware: for entities that already exist here (matched by name), it transfers only position, size, and color - the color carrying to their relationships - and never touches the schema. A whole context snaps into its designed shape in one paste. See Entities & Fields for the full copy/paste rules.

Why does an entity have a dashed border?

On a connected diagram, the database decides what is real. An entity that exists only in the diagram - freshly sketched, or pasted from another tab - shows a dashed border until a successful migration creates it in the database. The diagram’s JSON follows the same rule: with a live connection, schema changes persist to the file only after the migration succeeds (offline diagrams save immediately), so the file on disk never records tables the database has not confirmed.

A table the database added since your last save is marked differently, because the database already has it: a solid outer ring, and green on the minimap where a draft is orange. An open, a Refresh and a Reset ERD all mark it, and saving clears the mark.

There is no way to sneak a draft past this. When you save, Schemity generates the migration SQL diff for review and lists exactly which entities do not exist in the database yet - so an accidentally pasted entity is caught twice: once by its dashed border, once at save.

How does re-sync keep my schema documentation current?

If you document a production database schema with Schemity, the documentation maintains itself: open the diagram and you are looking at today’s schema, not last quarter’s. Because the diagram is stored as plain JSON, committing after a re-sync gives you a reviewable record of exactly how the schema drifted - see Version Control in Git. Your Context Views stay focused on their domains while the main view remains the ERD single source of truth.

Re-sync and Refresh are the pull direction; the push direction is the Migration SQL Diff, which turns your diagram edits into ALTER statements for the database. Together they keep diagram and database moving as one.

Why re-sync offline instead of through a cloud service?

Keeping documentation current usually means either manual effort or a cloud service watching your database. Schemity is a desktop app - the re-sync happens on your machine over your own connection, so a production schema stays where it belongs. No upload, no sync server, nothing for IT to review.