I'm trying to alter some table like this..
alter table(:team_members) do
add :kicked_out, :boolean, default: false
end
Shouldn't migrations be setting the default value for kicked_out ?
I'm seeing empty values on my database, and no default value..
The default value in migration is used to set the value for existing rows. The default value in the model is the one used when you are inserting new things.
Most helpful comment
The default value in migration is used to set the value for existing rows. The default value in the model is the one used when you are inserting new things.