I have a long varchar field that I’m using to save serialised data with drupal_write_record
. I’d like to set the default value of the column to “a:0:{}” (which is serialize(array())
).
However, when Drupal runs database updates, they are run through the update_sql()
function which includes the default value in the query. This means that the ‘{‘ and ‘}’ are interpreted as prefixing table names and removed, leaving the actual value of “a:0:” in the database, which is not what I want.
Is there a way to use curly braces in a field spec’s “default” value?