I’ve created a table with a references column in an earlier migration and now I would like to drop it. I know I can do a call to remove_column on the generated name, but is there a way to remove it using the the table name instead?
remove_references :blah, :users instead of remove_column :blah, :user_id
There is the method aptly named remove_references, as you guessed. It only needs one parameter, same as
referencesneeds one parameter too:From the API documentation: