Sha256: a96214ee51ba2bf807b81ae5ce9e42c507bc4c9cb35a78f21ac8b67627afbf6c
Contents?: true
Size: 691 Bytes
Versions: 4
Compression:
Stored size: 691 Bytes
Contents
module ActiveRecord module ConnectionAdapters #:nodoc: module SchemaStatements def change_table_with_remaps(table_name) t = Table.new(table_name, self) yield t return t.renamed_columns end end class Table 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 << [column_name, new_column_name] @base.rename_column(@table_name, column_name, new_column_name) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems