Sha256: fc46d81b5ed0cbe1b394d9f513b9e613bb73c7eb7f2d4a447d34086575ca0974

Contents?: true

Size: 434 Bytes

Versions: 2

Compression:

Stored size: 434 Bytes

Contents

class <%= param(:name).camelcase %> < <%= app_config.orm.camelcase %>::Migration

  def self.up
<%
    unless columns.empty?
-%>
    create_table :<%= @table_name %> do |t|
<%
      for column in columns
-%>
      t.column :<%= column.column_name %>, :<%= column.column_type %>
<%
      end
-%>
    end
<%
    end
-%>
  end

  def self.down
<%
    unless columns.empty?
-%>
    drop_table :<%= @table_name %>
<%
    end
-%>
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mack-0.4.6 lib/generators/migration_generator/templates/migration.rb.template
mack-0.4.7 lib/generators/migration_generator/templates/db/migrations/<%=@migration_name%>.rb.template