How to set column default from migration file?
MrSkinny opened this issue · 2 comments
MrSkinny commented
Say I want a db column to have a default value? I tried:
this.createTable("products", [
{ "name": "rating", "type": "integer", "properties": { "default": 1 } }
]);
But the schema.json
file created has an empty properties
object.
jeansaigne commented
Hi again MrSkinny,
not really sure about this one but you should use "defaultValue" instead of "default".
Hope it'll help
nikravi commented
Neither 'default' or 'defaultValue' didn't work for me