1
votes

Liquibase Version: 3.3.2

DB Platform: SQL Server 2014

Driver: jdbc 4.0

I have used the generateChangeLog command to produce a fresh set of deploy scripts from my DB. Many tables have NOT NULL columns, but when I test the Liquibase deploy (update) columns are all nullable. This is causing PK creation to fail.

Sample Change Set:

"createTable": {
  "columns": [
    {
      "column": {
        "constraints": {
          "constraints": {
            "nullable": false
          }
        },
        "name": "Model_Training_Id",
        "type": "CHAR(12)"
      }
    },
    ...

Any suggestions?

1
You have should have one "constraints" level, not 2 nested, see liquibase.org/documentation/json_format.html for an example (search for "constraints")user180100
That's as Liquibase generated it, without modification. Looks like a bug.reluctantdba

1 Answers

0
votes

The problem is in the JSON log that Liquibase generates. When I generate an XML change log this problem goes away. This looks to be a bug, which I will be logging.