method
drop_table
v4.0.2 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::SchemaStatements
drop_table(table_name, options = {})public
Drops a table from the database.
Although this command ignores options and the block if one is given, it can be helpful to provide these in a migration’s change method so it can be reverted. In that case, options and the block will be used by create_table.
1Note
use create table :force => true
if you want to drop a table before creating one in a migration, use the :force => true option of the create_table method