Sha256: 3811be3f3cd69ba55f3b3a53c0c9046454329114d9217977f0e1049bace3caf2

Contents?: true

Size: 407 Bytes

Versions: 1

Compression:

Stored size: 407 Bytes

Contents

class ZettoCreate<%= table_name.camelize %> < ActiveRecord::Migration<%= migration_version %>
  def change
    create_table :<%= table_name %> do |t|
      t.string :name
      t.text :description
    end
    <% migration_data.each do |name, properties| %>
        add_column :<%= table_name %>, :<%= name %>, <%= properties %> unless column_exists? :<%= table_name %>, :<%= name %>
    <% end %>
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zetto-2.2.0 lib/generators/active_record/templates/migration.erb