Sha256: 0810e1630fb8e24639ad676372b31c1847c70ba02b1a02f16256fdde54035139
Contents?: true
Size: 588 Bytes
Versions: 6
Compression:
Stored size: 588 Bytes
Contents
class <%=@migration.camelize %><%=@table_name.camelize %> < ActiveRecord::Migration def self.up <% @add_columns.each do |col| %> add_column :<%=@table_name %>, :<%=col.name %>, :<%=col.type %> <% end %> <% @drop_columns.each do |col| %> remove_column :<%=@table_name %>, :<%=col.name %> <% end %> end def self.down <% @drop_columns.each do |col| %> add_column :<%=@table_name %>, :<%=col.name %>, :<%=col.type %> <% end %> <% @add_columns.each do |col| %> remove_column :<%=@table_name %>, :<%=col.name %> <% end %> end end
Version data entries
6 entries across 6 versions & 1 rubygems