We are using liquibase for schema creation and upgrades over different versions. The issue we are facing is with SQL Server 2016 and 2017. Its working fine till 2014.
Here is what we need
We need to drop a column and its constraints. The column is a boolean column with a default value. We are using the following in the changeset to achieve this
We are seeing following error
liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE [dbo].[tableName]
DROP CONSTRAINT select d.name from syscolumns c,sysobjects d, sysobjects t where c.id=t.id AND d.parent_obj=t.id AND d.type=‘D’ AND t.type=‘U’ AND c.name=‘columnname’ AND t.name=‘tablename’
: Incorrect syntax near the keyword ‘select’.
the above select query returns two records for us both in SQL Server 2012 and 2016. The complete(Drop constraint) query seems to be working in 2012 but it fails in 2016.
Any pointers and help is appreciated.