Design and compare
Compare and sync
Compare the structure or the data of two schemas, generate the script that makes them match, and keep snapshots of the structure to see what changed.
Compare and sync is in the Advanced plan; the structure history, in the Max plan.
Compare structure
Right-click a schema (or database) → “Compare…”. Pick the source, which is the model, and the target, which is what changes; both must be the same engine.
The result lists each object as:
| Mark | Means |
|---|---|
| New | It's in the source and not in the target: it's created. |
| Changes | It exists in both with differences: columns, primary key, indexes or foreign keys. |
| Replaced | A view or routine with another definition: it's created again. |
| Only in the target | Extra in the target: it can be dropped. |
When you pick an object you see its SQL in the source and the target, and the detail of what changes. Qrulla recognizes when a table or column was only renamed, and renames it instead of dropping it, so its data stays.
Tick what you want to take to the target and Qrulla builds the script. You can open it in the editor or click “Run on the target”: first it shows how many statements there are and which ones delete data. In PostgreSQL, SQL Server and SQLite everything runs in a transaction; in MySQL, MariaDB and Oracle, structure changes can't be undone, so if a statement fails, the earlier ones stay done.
After running, Qrulla compares again.
Compare data
In the same dialog, choose “Data”. Qrulla compares the rows of the tables with the same name by their primary key; the target can be another engine.
For each table you see how many rows must be inserted, updated or deleted, and the first different rows. Tick what to apply and:
- “Show script” or “Open in the editor” to review the statements, or
- “Apply on the target”, which asks you to confirm how many inserts, updates and deletes there are.
Everything runs in a transaction, except in Oracle, which commits each statement. A table without a primary key, or with a different key on each side, isn't compared.
Structure history
Max plan. Qrulla keeps a snapshot of a schema's structure (tables, columns, indexes, views, routines) when you open it, at most every 6 hours and only if it changed. Snapshots stay on your computer.
Right-click the schema → “Structure history…”. Pick a snapshot and “Compare with now” to see what changed since then. The generated script takes the structure back to how it was in the snapshot (not the data). “Take a photo now” saves one on the spot.
Something missing or unclear? Write to support@qrulla.com.