Heroku Drop Table Rails Help

后端 未结 3 1756
眼角桃花
眼角桃花 2021-02-06 07:07

I am using Ruby on Rails and I no longer need my table Order so I deleted it using SQLite manager.. How can I make the table deletion take place in heroku?

3条回答
  •  甜味超标
    2021-02-06 07:42

    Execute following command.Here 'abc' is app name

    heroku run console --app abc
    

    Then use,

    ActiveRecord::Migration.drop_table(:orders)
    

    It will drop the table 'order'.

提交回复
热议问题