Merge pull request #23350 from kamipo/refactor_schema_migration_drop_table
Make `SchemaMigration.drop_table` to one SQL
This commit is contained in:
commit
7d18de3bb5
@ -37,10 +37,7 @@ def create_table(limit=nil)
|
||||
end
|
||||
|
||||
def drop_table
|
||||
if table_exists?
|
||||
connection.remove_index table_name, name: index_name
|
||||
connection.drop_table(table_name)
|
||||
end
|
||||
connection.drop_table table_name, if_exists: true
|
||||
end
|
||||
|
||||
def normalize_migration_number(number)
|
||||
|
Loading…
Reference in New Issue
Block a user