Lukla Data Studio Docs

Docs Server and objects

Schema Compare

Compare two databases' schemas object by object, see each difference side by side, and generate a script that brings the target up to date.

On this page
  1. Pick what to compare
  2. Ignore what doesn't matter
  3. The update script

Tools ▸ Schema Compare… (⌥⌘D), or right-click a database ▸ Compare Schema With…, compares two databases, on the same server or different ones: development against production, a branch database against main, before and after a migration.

#Pick what to compare

Choose a source (the schema you want) and a target (the database to bring up to date). The compare opens in a tab:

  • The object tree on the left groups differences by kind (tables, views, procedures, functions…), each marked as only in the source, only in the target, or different. All Kinds and the kind filter narrow it; Show same includes identical objects.
  • The diff on the right shows the selected object's definition in the source and the target side by side, with the changes highlighted.

#Ignore what doesn't matter

The Ignore options keep noise out of the differences:

  • whitespace;
  • keyword case and CREATE versus ALTER;
  • system-generated constraint names (PK__Orders__C3905BAF…);
  • column order;
  • collation;
  • comments.

#The update script

Tick the objects to include (All / None per kind), then Generate Update Script: a script that makes the target match the source opens in a query tab. Objects only in the target are dropped only with Include drops on; otherwise their DROP lines are there but commented out. Read it, then run it; nothing runs by itself.

Swap exchanges source and target, and Compare Again refreshes after you change either database.