I am trying to add a new field with liquibase
<addColumn tableName="contact_client">
<column defaultValue="0"
defaultValueBoolean="0"
name="obsolete"
type="boolean"/>
</addColumn>
But I am getting this error :
liquibase.exception.DatabaseException: Invalid default value for 'obsolete' [Failed SQL: ALTER TABLE myApp.contact_client ADD obsolete BIT(1) DEFAULT 'false' NULL]
How can I pass a default value?
Actually, here is the solution for a MySQL database:
<addColumn tableName="contact_client">
<column defaultValueBoolean="false"
name="obsolete"
type="boolean"/>
</addColumn>
I needed to remove the defaultValue property.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With