In my Rails (3.2) app, I have a bunch of tables in my database but I forgot to add a few not null constraints. I've googled around but I can't find how to write a migration which adds not null to an existing column.
TIA.
You can also use change_column_null:
change_column_null :table_name, :column_name, false