Any information as to why liquibase does that and how to prevent it from changing the type when adding a primary key? I can't find any mention of it in the docs or any other mention of this behaviour online.
it could be that the RDBMS-specific code for that has changed. Can you tell me which RDBMS (PostgreSQL/MariaDB/MSSQL/…) you are using, which Liquibase version the old behaviour showed, and since which Liquibase version you are seeing the different data type?
Ok, just so that I have a test case I can reproduce the problem with, can you post:
- The CREATE TABLE-Statement of the table (in the state before the change set runs)
- The relevant part of your changelog/changeset
Thanks for the reply. I’m using MariaDB and the latest version of Liquibase. I’m currently testing Liquibase for use at my place of work so have no previous version. The changelogs are generated from the Liquibase command.
Had a look at this again this morning and managed to fix this by changing the columnDataType to SMALLINT(5) UNSIGNED in the addAutoIncrement section. Seems to be working as intended now. Probably user error to be honest.