Empty string in INSERT tag gets (incorrectly?) turned into a NULL value

Hi there,

while dumping and importing a database using liquibase (2.0 RC5), I ran in to a NULL-value issue.

The following change tries to insert NULL into the USER_ID column, corrupting the data:

                                                       

Does anyone know, how I can “fix” the XML-script to not insert NULL in this case?

Jens

It was a discussion we were having on another thread (http://liquibase.org/forum/index.php?topic=658.0) and I ended up reverting the old 1.9.5 logic of empty string is null. 

It’s not a good solution, though, and so I think it will be best to break some people that were relying on it than to continue the unexpected behavior you are seeing.  I’ll revert that change so if you speicfy “” you will get a null value.

Nathan

Nathan,

thanks for the pointer

Jens