What’s the syntax for dropping a database table column through a Rails migration?

23 s
23

remove_column :table_name, :column_name

For instance:

remove_column :users, :hobby

would remove the hobby Column from the users table.

Leave a Reply

Your email address will not be published. Required fields are marked *