# Diff creates wrong changelog for mssql

**URL:** <https://forum.liquibase.org/t/diff-creates-wrong-changelog-for-mssql/10672>\
**Category:** Liquibase Development\
**Created:** [September 26, 2025, 2:52pm UTC](https://forum.liquibase.org/t/diff-creates-wrong-changelog-for-mssql/10672 "2025-09-26T14:52:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![toprak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/toprak/32/1364_2.png) [@toprak](https://forum.liquibase.org/u/toprak)\
**Post date:** [September 26, 2025, 2:52pm UTC](https://forum.liquibase.org/t/diff-creates-wrong-changelog-for-mssql/10672/1 "2025-09-26T14:52:00Z")

</div>

```auto
<plugin>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-maven-plugin</artifactId>
                <version>4.33.0</version>
                <configuration>
                    <propertyFile>src/main/resources/liquibase.properties</propertyFile>
                    <changeLogFile>src/main/resources/db/changelog/db.changelog-master.yaml</changeLogFile>
                    <diffChangeLogFile>src/main/resources/db/changelog/changes/v1.0.2-changelog.mssql.sql</diffChangeLogFile>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.liquibase.ext</groupId>
                        <artifactId>liquibase-hibernate6</artifactId>
                        <version>4.33.0</version>
                        <scope>runtime</scope>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-data-jpa</artifactId>
                        <version>3.5.5</version>
                    </dependency>
                    <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-validation</artifactId>
                        <version>3.5.5</version>
                    </dependency>
                </dependencies>
            </plugin>

```

```auto
<dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <version>4.33.0</version>
 </dependency>

```

These are the dependencies in my pom.xml. And this is my liquibase.properties:

```auto
url=jdbc:sqlserver://localhost:1433;databaseName=dbname;encrypt=false;trustServerCertificate=true
liquibase.command.defaultSchemaName=dbo
username=sa
password=password123
referenceUrl=hibernate:spring:com.application.middleware.entity?dialect=org.hibernate.dialect.SQLServerDialect
referenceDriver=liquibase.ext.hibernate.database.connection.HibernateDriver

```

When I generate diff using my entities, for fields where I use @Lob or @Column(length = Integer.MAX\_VALUE) or @Column(columnDefinition = “NVARCHAR(MAX)”) etc. the generated changelog as either

```auto
message varchar(1), messageTemplate varchar(1)

```

or

```auto
message nvarchar(1), messageTemplate nvarchar(1)

```

I couldn’t find any other questions on this topic, and it was working fine for my postgres db.

---

<div class="post-metadata">

**Author:** ![Pete](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/pete/32/184_2.png) [@Pete](https://forum.liquibase.org/u/Pete)\
**Post date:** [October 31, 2025, 2:44pm UTC](https://forum.liquibase.org/t/diff-creates-wrong-changelog-for-mssql/10672/2 "2025-10-31T14:44:53Z")

</div>

Thanks for reaching out @toprak .

I’m not aware of anything at the MSSQL level that would account for this change in behavior from Postgresql. I would file this as a GitHub issue so the community team can take a look at it: [GitHub · Where software is built](https://github.com/liquibase/liquibase/issues)
