You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
precence validations should NOT be added for columns that have a default like this. this applies to array fields as well as json or jsonb fields (that have a default). As we are simply stating (for the DB) that we want it to never be null, but have a an empty representation by default.. {} or [].
We encounter this with t.jsonb :my_field, null: false, default: {}
Given the following migration:
t.text :my_field, array: true, null: false, default: []
There's still a presence validation being added when there shouldn't be.
This is w/ Version 2.2.1
The text was updated successfully, but these errors were encountered: