Diff Text
Published 15 January 2025
Description
The diffText commands prints out the object level differences from the differences generated by the diff command.
Usage examples
Selective changes
flyway diff -source=dev -target=schemaModel
flyway diffText -changes="id1,id2"
Diff and diffText chained
flyway diff -source=dev -target=schemaModel diffText
Parameters
Optional
| Parameter | Namespace | Description | 
|---|---|---|
| artifactFilename | diffText | The path to the diff artifact. | 
| changes | diffText | A comma separated list of change ids. | 
Universal commandline parameters are listed here.
JSON output format
{
  "differences" : [ {
    "id" : "MQuXdkRAEhEyd5TIPzVoCStUucA",
    "differenceType" : "Add",
    "objectType" : "Table",
    "from" : {
      "schema" : "Schema",
      "name" : "table2",
      "definition" : "CREATE TABLE Schema.table2 (\n    id int NULL,\n    name varchar(10) NULL\n);"
    },
    "to" : null
  }, {
    "id" : "exY9fOdORvbrXOYNPoqMmifWlEA",
    "differenceType" : "Add",
    "objectType" : "View",
    "from" : {
      "schema" : "Schema",
      "name" : "view1",
      "definition" : "CREATE VIEW Schema.view1 AS select `Schema`.`table1`.`id` AS `id`,`Schema`.`table1`.`name` AS `name` from `Schema`.`table1`;"
    },
    "to" : null
  }, {
    "id" : "K5GPl1kQtgirPltRFC265Oni42M",
    "differenceType" : "Delete",
    "objectType" : "Table",
    "from" : null,
    "to" : {
      "schema" : "Schema",
      "name" : "table3",
      "definition" : "CREATE TABLE Schema.table3 (\n    id int NULL,\n    name varchar(15) NULL\n);"
    }
  } ]
}
Error codes
This command can produce the following error codes: