且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Rails数据库迁移 - 如何删除表?

更新时间:2023-02-03 17:59:22

You won't always be able to simply generate the migration to already have the code you want. You can create an empty migration and then populate it with the code you need.

You can find information about how to accomplish different tasks in a migration here:

http://api.rubyonrails.org/classes/ActiveRecord/Migration.html

More specifically, you can see how to drop a table using the following approach:

drop_table :table_name

相关阅读

技术问答最新文章