Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

addNotNullConstraint doesn't work with mysql

$
0
0
I use Liquibase 2.0.5,

here's snippet from my config:

  1.  <addNotNullConstraint columnDataType="VARCHAR(64)"
  2.                               columnName="permissions"
  3.                               defaultNullValue="ROLE_ADMIN"
  4.                               schemaName="users"
  5.                               tableName="apiTokens"/>
No errors or exceptions, but when I try to insert null into permissions column I receive:

ERROR 1048 (23000): Column 'permissions' cannot be null

- but I need null to be replaced with my default value.
Please help.
Thanks a lot in advance

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>