Sha256: 1bc39a8835f127715a01162a71d260ab67aa870fd50eed153f8fb96b84167772

Contents?: true

Size: 461 Bytes

Versions: 6

Compression:

Stored size: 461 Bytes

Contents

module FastChangeTable
  module TableInstanceMethods
    def initialize(table_name, base)
      @table_name = table_name
      @base = base
      @renamed_columns = []
    end
  
    def renamed_columns
      @renamed_columns || []
    end
  
    def rename(column_name, new_column_name)
      @renamed_columns ||= []
      @renamed_columns << [column_name, new_column_name]
      @base.rename_column(@table_name, column_name, new_column_name)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fast_change_table-1.6.0 lib/fast_change_table/table.rb
fast_change_table-1.5.1 lib/fast_change_table/table.rb
fast_change_table-1.5.0 lib/fast_change_table/table.rb
fast_change_table-1.4.0 lib/fast_change_table/table.rb
fast_change_table-1.3.0 lib/fast_change_table/table.rb
fast_change_table-1.2.0 lib/fast_change_table/table.rb