Browse files

Oracle needs table to check index existence

  • Loading branch information...
1 parent dba022f commit d2cc10c20000955da482e469078706793b310b01 @joshsusser committed Dec 6, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/lib/active_record/schema_migration.rb
View
6 activerecord/lib/active_record/schema_migration.rb
@@ -42,10 +42,10 @@ def self.create_table
end
def self.drop_table
- if connection.index_exists?(table_name, "version", :unique => true, :name => index_name)
- connection.remove_index(table_name, :name => index_name)
- end
if connection.table_exists?(table_name)
+ if connection.index_exists?(table_name, "version", :unique => true, :name => index_name)
+ connection.remove_index(table_name, :name => index_name)
+ end
connection.drop_table(table_name)
end
end

0 comments on commit d2cc10c

Please sign in to comment.