Skip to content

Projects and options

Pair a source and a target database, choose what to compare and what to ignore, and add extra targets.

A project pairs two databases to compare: the source (X) and the target (Y). Parallax compares the schema of the source with the target, and can then change the target to match. The project keeps its comparison options, so every comparison of the pair works the same way.

Create a project

You need at least one connection first. Without one, Parallax says “Add a connection first” and opens a new connection.

  1. Open Projects and choose New project. You can also use File > New project… or New comparison on the Overview.
  2. Enter a Name, such as Staging vs production.
  3. Under X (Source), choose a Connection and a Database.
  4. Under Y (Target), choose a Connection and a Database. Only connections of the source’s engine are listed.
  5. Optionally, choose a Schema on each side.
  6. Optionally, open Comparison options.
  7. Choose Create project.

Both sides must use the same engine. If they do not, Parallax says “Use one database engine”.

Schemas

The Schema fields show once you choose a connection. They start on the engine’s default schema: public for PostgreSQL, dbo for SQL Server. Leave a schema empty to compare every schema.

MySQL databases have no schemas, so the Schema fields are hidden for MySQL.

If the two sides name different schemas, deploying creates the source’s objects in the target’s schema.

Swap source and target

Choose Swap source and target between the two sides. It swaps the connection, database and schema of X and Y.

Comparison options

Open Comparison options in the project dialog. The options apply to every comparison of the project.

Ignore

Each Ignore option makes a kind of difference count as identical.

Option What it ignores Engines On for a new project
Column order Tables whose columns are in a different order count as identical. Deploying never reorders columns, since that rebuilds the table. All PostgreSQL
Owners Who owns an object. All MySQL
Privileges GRANTs and REVOKEs. PostgreSQL, SQL Server Yes
Tablespaces Where tables and indexes are stored. PostgreSQL, SQL Server Yes
Whitespace in code Functions, views and procedures that differ only in spacing. All No
Comments in code SQL comments inside functions and views. All Yes
Letter case in code Upper and lower case differences in definitions. All No
Column defaults DEFAULT expressions on columns. All No
Statistics targets Per-column statistics settings. PostgreSQL No
Table partitions Partitions of partitioned tables. PostgreSQL No
Range partitions Partitions of RANGE-partitioned tables. They are usually created on a schedule, and deploying them would drop the target’s partitions and their rows. PostgreSQL Yes

Column order starts on for PostgreSQL because PostgreSQL cannot reorder columns in place, so the difference could never be deployed. Owners starts on for MySQL because views, routines and triggers record their definer, which differs between servers.

Exclude tables like

PostgreSQL only. Enter a LIKE pattern, such as tmp_% or %_backup. Matching tables are left out of the comparison.

Rehearse deployments

MySQL only. Rehearse deployments on a scratch database first is on by default. Each deployment runs first on an empty copy of the target’s schema, on the same server. Switch it off where the server does not allow creating databases. The deploy wizard can change it for one deployment. See MySQL rehearsal.

Object kinds

Tick the kinds of object to compare. The heading shows how many are ticked. All ticks every kind; None clears them.

Engine Kinds of object
PostgreSQL Tables & data: tables, indexes, sequences, statistics, policies, foreign tables. Code: views, materialized views, functions, procedures, triggers, aggregates, operators, event triggers. Types: enums, domains, composite types, ranges, collations, casts, conversions. Database-wide: schemas, extensions, roles, databases, tablespaces, settings, publications, subscriptions, foreign data wrappers, foreign servers, user mappings, access methods, operator families, text search configurations, dictionaries, parsers and templates.
SQL Server Tables & data: tables, indexes, sequences, security policies. Code: views, functions, procedures, triggers. Types: alias types, table types. Database-wide: schemas, roles.
MySQL Tables & data: tables. Code: views, functions, procedures, triggers, events.

Every kind is on for a new project except roles, databases and tablespaces.

Extra targets

A project can compare the same source with more databases at once, for example one per region. Each target gets its own result.

  1. In the project dialog, under Extra targets, choose Add a target.
  2. Enter a Label, such as prod-eu.
  3. Choose a Connection of the same engine, and a Database.
  4. Optionally, enter a schema. The field is hidden for MySQL.

Choose Remove target to remove a row. Each extra target needs a connection and a database, or Parallax says “Check the extra targets”.

Compare every target

On a project with extra targets, Compare compares the source with every target at once. The banner counts the targets compared. When it finishes, a dialog lists each target with its number of differences and its status. Choose Open to open a target’s comparison. A failed target shows Failed, with the error as its tooltip.

In the Projects list, the Last result column shows how many targets differ.

A comparison of an extra target shows a Target: <label> tag in its header.

The Projects list

  • Search projects filters by name, connection or database.
  • Compares shows the source above the target.
  • Last result shows the latest status, or “Not compared”.
  • Compare, or a double-click, compares the project and opens the result. Comparing is not available while another job runs.
  • More actions has Edit, Comparison history (the project’s comparisons) and Delete.

Deleting a project also deletes its comparisons.

Declared renames

The project dialog’s Same objects section lists the renames declared from the project’s comparisons. See Renames.