I'm trying to define my database structure, but I can't figure out how to set the default value of a column to NULL
. This is what I want it to produce:
CREATE TABLE test (
content text DEFAULT(NULL),
);
I have the following code
let content = Expression<String?>("content")
try self.db.run(test.create { t in
t.column(content, defaultValue: nil)
})
But defaultValue: nil
obviously does not work. What do I set instead?