Class: Cequel::Schema::Patch::RenameColumn

Inherits:
AbstractChange show all
Defined in:
lib/cequel/schema/patch.rb

Overview

Since:

  • 1.0.0

Instance Attribute Summary collapse

Attributes inherited from AbstractChange

#table

Instance Method Summary collapse

Methods inherited from AbstractChange

#==, #eql?, #inspect

Instance Attribute Details

#new_nameObject (readonly)

Since:

  • 1.0.0



137
138
139
# File 'lib/cequel/schema/patch.rb', line 137

def new_name
  @new_name
end

#old_nameObject (readonly)

Since:

  • 1.0.0



137
138
139
# File 'lib/cequel/schema/patch.rb', line 137

def old_name
  @old_name
end

Instance Method Details

#to_cqlObject

Since:

  • 1.0.0



139
140
141
# File 'lib/cequel/schema/patch.rb', line 139

def to_cql
  %Q|ALTER TABLE "#{table.name}" RENAME "#{old_name}" TO "#{new_name}"|
end