Ticket #10855: drop_table_if_exists.diff
| File drop_table_if_exists.diff, 0.6 kB (added by adamwiggins, 9 months ago) |
|---|
-
a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
old new 585 585 execute "ALTER TABLE #{name} RENAME TO #{new_name}" 586 586 end 587 587 588 # Drops a table from the database. 589 def drop_table(table_name, options = {}) 590 args = options[:force] ? " IF EXISTS" : "" 591 execute "DROP TABLE#{args} #{quote_table_name(table_name)}" 592 end 593 588 594 # Adds a column to a table. 589 595 def add_column(table_name, column_name, type, options = {}) 590 596 default = options[:default]