Sha256: b5d9927e072d68cf2c04aa0da4b7a45f4fd3cb5f69447e86250ef028c7d53475

Contents?: true

Size: 285 Bytes

Versions: 113

Compression:

Stored size: 285 Bytes

Contents

class <%= migration_name %> < ActiveRecord::Migration
  def self.up
    create_table :<%= table_name %> do |t|
<% for attribute in attributes -%>
      t.<%= attribute.type %> :<%= attribute.name %>
<% end -%>
    end
  end

  def self.down
    drop_table :<%= table_name %>
  end
end

Version data entries

113 entries across 57 versions & 2 rubygems

Version Path
backlog-0.0.0 vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb
backlog-0.0.0 vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
backlog-0.0.1 vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb
backlog-0.0.1 vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
backlog-0.0.2 vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
backlog-0.0.2 vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb
backlog-0.0.5 vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb
backlog-0.0.4 vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb
backlog-0.0.5 vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
backlog-0.0.4 vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
backlog-0.1.1 vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
backlog-0.1.0 vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb
backlog-0.1.0 vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
backlog-0.1.1 vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb
backlog-0.1.2 vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
backlog-0.1.2 vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb
backlog-0.2.0 vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
backlog-0.2.0 vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb
backlog-0.2.1 vendor/rails/railties/lib/rails_generator/generators/components/model/templates/migration.rb
backlog-0.2.1 vendor/rails/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb