aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract
diff options
context:
space:
mode:
authorTobias Lütke <tobias.luetke@gmail.com>2005-10-06 14:10:45 +0000
committerTobias Lütke <tobias.luetke@gmail.com>2005-10-06 14:10:45 +0000
commitebfddf35b9d4ebcdb5be37df77b83b2e1e16df97 (patch)
treeaabf37727ae0d35131bebbd2df8c877210db06cc /activerecord/lib/active_record/connection_adapters/abstract
parent7e70fc1e9d1bd3f1d0be37fcf23dae1736ccbaaa (diff)
downloadrails-ebfddf35b9d4ebcdb5be37df77b83b2e1e16df97.tar.gz
rails-ebfddf35b9d4ebcdb5be37df77b83b2e1e16df97.tar.bz2
rails-ebfddf35b9d4ebcdb5be37df77b83b2e1e16df97.zip
Add rename_table to mysql, sqlite and postgres adapters for use in migrations
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2477 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index 861480d980..366192909e 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -90,6 +90,13 @@ module ActiveRecord
create_sql << ") #{options[:options]}"
execute create_sql
end
+
+ # Renames a table.
+ # ===== Example
+ # rename_table('octopuses', 'octopi')
+ def rename_table(name, new_name)
+ raise NotImplementedError, "rename_table is not implemented"
+ end
# Drops a table from the database.
def drop_table(name)
@@ -109,7 +116,7 @@ module ActiveRecord
# remove_column(:suppliers, :qualification)
def remove_column(table_name, column_name)
execute "ALTER TABLE #{table_name} DROP #{column_name}"
- end
+ end
# Changes the column's definition according to the new options.
# See TableDefinition#column for details of the options you can use.