I am trying to modify the data type on a number of columns from int to bigint using:
<modifyDataType tableName="ACCESS_HISTORY" columnName="ID" newDataType="${LongType}"/>
Where I have defined LongType to be:
<property name="LongType" value="bigint" dbms="mssql"/>
I noticed in the Liquibase JIRA (https://liquibase.jira.com/browse/CORE-1062) that there is a known issue from 2011 relating to the PKs and FKs that need to be dropped. Dropping and re-creating the keys isn't really an option for me.
The error I got was:
liquibase.exception.MigrationFailedExc
eption: Migration failed for change set ChangeColumnTypes.xml::4-4-060
-2::thof:
Reason: liquibase.exception.DatabaseException: Error executing SQL ALTER TA
BLE [dbo].[ACCESS_HISTORY] ALTER COLUMN [ID] BIGINT: The object 'PK_Access_Histo
ry' is dependent on column 'ID'.:
Caused By: Error executing SQL ALTER TABLE [dbo].[ACCESS_HISTORY] ALTE
R COLUMN [ID] BIGINT: The object 'PK_Access_History' is dependent on column 'ID'
I was wondering if anyone had got around this? Thanks in advance