method
drop_table
v4.0.2 -
Show latest stable
-
1 note -
Class: ActiveRecord::ConnectionAdapters::SchemaStatements
- 1.0.0 (0)
- 1.1.6 (0)
- 1.2.6 (0)
- 2.0.3 (0)
- 2.1.0 (0)
- 2.2.1 (0)
- 2.3.8 (0)
- 3.0.0 (0)
- 3.0.9 (0)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2 (38)
- 4.1.8 (0)
- 4.2.1 (16)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1 (16)
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- 7.2.3 (0)
- 8.0.0 (12)
- 8.1.1 (0)
- What's this?
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.
Register or
log in
to add new notes.
ivanoats -
April 8, 2009
2 thanks
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

