Answers for "drop table ruby on rails"

5

how to delete a table in rails

rails g migration DropProducts

class DropProducts < ActiveRecord::Migration
  def change
    drop_table :products
  end
end
Posted by: Guest on February-14-2020
0

droptable rails

rails generate migration drop_tablename
Posted by: Guest on August-21-2021
0

droptable rails

drop_table :table_name
Posted by: Guest on August-21-2021

Browse Popular Code Answers by Language