Skip to content

Work across Git revisions

There are two separate questions:

  • sqlrs diff compares the paths and content hashes of prepare input files.
  • plan --ref or prepare --ref reads inputs from a selected commit or tag.
sqlrs diff --from-ref origin/main --to-ref HEAD plan:psql -- -f db/prepare.sql

The command collects related files independently in each revision, including psql \i and \ir includes, then reports added, changed, and removed inputs. Liquibase follows changelog relations:

sqlrs diff --from-ref v1.2.0 --to-ref HEAD prepare:lb -- update --changelog-file db/changelog.xml