Inserting string "NULL" into column

You would insert empty strings now by passing an empty string.  It is currently hard-coded to support nullPlaceholder=“null” but that is the only value that will convert to null.

An XSLT would be a good idea, probably on the extensions area.  It woudl be best to fix it with 2.0, but I’m really wanting to get it released.  If it is easy to implement and does not introduce issues I would be fine including it in 2.0.

Nathan

Hi Nathan, Oleg,

I’m not sure that this fixes my original problem, which was that I want to insert the string “NULL” into a column. This was working previously at 1.9, but isn’t working with the trunk at revision 1776.

Best wishes,

Dean.

Dean,
introducing the nullPlaceholder=“null” attribute and “” as empty, but not null value, will fix you original problem.
You may specify nullPlaceholder=“WhatIsNotCurrentInUseString” and your “null” value will be treated as a string.
I think a XSLT script may be written as a separate facility and might be applied to the liquibase changeset files external to the liquibase core/extension functionality through ant/maven before manipulation with checksums, that is required for jump 1.9 -> 2.0.

Hi Oleg - my concern is that currently that the nullPlaceholder attribute isn’t used and liquibase is hard-coded to use the string “null” (case-insensitive) to indicate a value, which is where we started.

Best wishes,

Dean. 

Yes, since I’m pushing off the nullPlaceholder feature until a later release, to insert rows with the string “null”, you are going to have to use the tag.  Hopefully it will be able to be a part of 2.1 before long.

Nathan

You can always also use the raw tags for the times you do need to insert the string “null” until the nullPlaceholder feature is implemented

Nathan

For me it seems as a really bad idea to interprete the value at all.
What are you doing with NULL, NULL, NULL, ‘NULL’? What are you doing if you have two columns which need different placeholders? How do you want to document this behaviour?

And it is unclear why you need the line with the column tag at all if you want that value to be NULL, the default. If you want to overwrite the default value, than you could use a special property, e.g. nullValue=“true” or isNull=“true”.

And the diff should also produce the right changeSet if it finds the string null. Which 2.0.4 does not do.