class DropUsers < ActiveRecord::Migration def change drop_table :users do |t| t.string :email, null: false t.timestamps null: false end end end

youko03youko03 のブックマーク 2020/12/11 17:27

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

Rails DB Migration - How To Drop a Table?

    I added a table that I thought I was going to need, but now no longer plan on using it. How should I remove that table? I've already run migrations, so the table is in my database. I figure rails g...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう