Method: Cequel::Schema::TableUpdater#rename_column

Defined in:
lib/cequel/schema/table_updater.rb

#rename_column(old_name, new_name) ⇒ void

This method returns an undefined value.

Rename a column

Parameters:

  • old_name (Symbol)

    the current name of the column

  • new_name (Symbol)

    the new name of the column

Since:

  • 1.0.0



96
97
98
# File 'lib/cequel/schema/table_updater.rb', line 96

def rename_column(old_name, new_name)
  add_stmt %Q|ALTER TABLE "#{table_name}" RENAME "#{old_name}" TO "#{new_name}"|
end