From d2cc10c20000955da482e469078706793b310b01 Mon Sep 17 00:00:00 2001 From: Josh Susser Date: Thu, 6 Dec 2012 09:08:43 -0800 Subject: [PATCH] Oracle needs table to check index existence --- activerecord/lib/active_record/schema_migration.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/activerecord/lib/active_record/schema_migration.rb b/activerecord/lib/active_record/schema_migration.rb index b2ae369eb6..6c3cd5b6ba 100644 --- a/activerecord/lib/active_record/schema_migration.rb +++ b/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 -- GitLab