aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/schema_migration.rb
diff options
context:
space:
mode:
authorJosh Susser <josh@hasmanythrough.com>2012-12-06 09:08:43 -0800
committerJosh Susser <josh@hasmanythrough.com>2012-12-06 09:38:32 -0800
commitd2cc10c20000955da482e469078706793b310b01 (patch)
treebbc5a9db511d85b5fe4e53f05a0acf8c39f174bb /activerecord/lib/active_record/schema_migration.rb
parentdba022f3a9f1c0e256ae290ffffd332f7a9fd250 (diff)
downloadrails-d2cc10c20000955da482e469078706793b310b01.tar.gz
rails-d2cc10c20000955da482e469078706793b310b01.tar.bz2
rails-d2cc10c20000955da482e469078706793b310b01.zip
Oracle needs table to check index existence
Diffstat (limited to 'activerecord/lib/active_record/schema_migration.rb')
-rw-r--r--activerecord/lib/active_record/schema_migration.rb6
1 files 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 @@ module ActiveRecord
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