Skip to content

Diff between branches

Bernardo Ramos edited this page Sep 12, 2018 · 4 revisions

There are 3 ways to diff 2 branches:

  1. Get the SQL commands used to generate each of the 2 commits starting from the same common ancestor. Display the commands for each branch.

    These SQL commands are retrieved from the log / history.

  2. Use the sqldiff method, displaying the SQL commands needed to make the source become identical to dest.

    These SQL commands are generated by code.

  3. Display the differences in tables, columns, rows, views, indexes and triggers.


Showing the diff between 2 branches or commits:

PRAGMA branch_diff {from_branch}[.{commit}] {to_branch}[.{commit}]

Examples

PRAGMA branch_diff master dev
PRAGMA branch_diff master.12 master
PRAGMA branch_diff dev.5 test.8
Clone this wiki locally