Liquibase Not Assigning Right Default Values to Primary Key Columns on MSSQL database

Description

I have generated a generateChangelog on a current database, I have attempted to create a new database from that changelog using update/updateSQL(tried both). I've come across some strange behaviour as below.

When trying to create tables on the new database with the changelog, faced the following problems:

a) Default Value of the column is changed from NOT NULL to NULL on column A. b) Problem "a" is causing another issue which is "Cannot define PRIMARY KEY constraint on nullable column in table 'column A'

Any information as to why liquibase does that and how to prevent it doing the above behavior ? I can't find any mention of it in the docs or any other mention of this behavior online. We have several databases and manually fixing these changes will be a hurdle.

Environment

PROD

Reporter

Dheeraj Maganti

Components

Affects versions

Priority

Major
Configure