diff options
author | Josh Susser <josh@hasmanythrough.com> | 2012-12-06 09:08:43 -0800 |
---|---|---|
committer | Josh Susser <josh@hasmanythrough.com> | 2012-12-06 09:38:32 -0800 |
commit | d2cc10c20000955da482e469078706793b310b01 (patch) | |
tree | bbc5a9db511d85b5fe4e53f05a0acf8c39f174bb /activerecord/lib | |
parent | dba022f3a9f1c0e256ae290ffffd332f7a9fd250 (diff) | |
download | rails-d2cc10c20000955da482e469078706793b310b01.tar.gz rails-d2cc10c20000955da482e469078706793b310b01.tar.bz2 rails-d2cc10c20000955da482e469078706793b310b01.zip |
Oracle needs table to check index existence
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/schema_migration.rb | 6 |
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 |