Apidock_header
  • Welcome
  • Register
  • Projects
  • Help
  • About
  • Blog
Use OpenID
  • Ruby_icon_16Ruby
  • Rails_icon_16Ruby on Rails
  • Rspec_icon_16RSpec
method

rename_column

Importance_1
v1.2.5 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters::SchemaStatements
  • 1.0.0 (0)
  • 1.1.0 (0)
  • 1.1.1 (0)
  • 1.1.2 (0)
  • 1.1.3 (0)
  • 1.1.4 (0)
  • 1.1.5 (0)
  • 1.1.6 (0)
  • 1.2.0 (0)
  • 1.2.1 (0)
  • 1.2.2 (0)
  • 1.2.3 (0)
  • 1.2.4 (0)
  • 1.2.5 (0)
  • 1.2.6 (0)
  • 2.0.0 (0)
  • 2.0.1 (0)
  • 2.0.2 (0)
  • 2.0.3 (0)
  • 2.1.0 (0)
  • 2.2.1 (0)
  • 2.3.2 (0)
  • 2.3.4 (0)
  • What's this?

Related methods

  • Instance methods (30)
  • Importance_5_sm add_column
  • Importance_0_sm add_column_options!
  • Importance_3_sm add_index
  • Importance_1_sm add_order_by_for_associatio...
  • Importance_1_sm add_timestamps
  • Importance_0_sm assume_migrated_upto_version
  • Importance_2_sm change_column
  • Importance_3_sm change_column_default
  • Importance_3_sm change_table
  • Importance_1_sm columns
  • Importance_4_sm create_table
  • Importance_1_sm distinct
  • Importance_1_sm drop_table
  • Importance_0_sm dump_schema_information
  • Importance_0_sm index_name
  • Importance_1_sm initialize_schema_information
  • Importance_1_sm initialize_schema_migration...
  • Importance_1_sm native_database_types
  • Importance_0_sm options_include_default? Icon_protected_sm
  • Importance_1_sm remove_column
  • Importance_1_sm remove_columns
  • Importance_1_sm remove_index
  • Importance_1_sm remove_timestamps
  • Importance_1_sm rename_column
  • Importance_1_sm rename_table
  • Importance_1_sm structure_dump
  • Importance_1_sm table_alias_for
  • Importance_1_sm table_alias_length
  • Importance_1_sm table_exists?
  • Importance_0_sm type_to_sql

Icon_private_sm = private
Icon_protected_sm = protected

rename_column(table_name, column_name, new_column_name) public

Renames a column.

Example
 rename_column(:suppliers, :description, :name)
Show source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 156
      def rename_column(table_name, column_name, new_column_name)
        raise NotImplementedError, "rename_column is not implemented"
      end
Register or log in to add new notes.
  • Welcome
  • Register
  • Projects
  • Help
  • About
  • Blog


APIdock release: IRON STEVE (1.4) - Current revision: #1051
Supported browsers are Safari 3+, Firefox 2+, Opera 9.5 and Internet Explorer 7
If you have any comments, ideas or feedback, feel free to contact us at

APIdock copyright Nodeta Oy 2008

Go to Nodeta blog