Sha256: 1ae67abee9ef43a426062156ee46e31239e5b4e67fc4210d15f94be311cfa54f

Contents?: true

Size: 456 Bytes

Versions: 10

Compression:

Stored size: 456 Bytes

Contents

class CloudfujiCreate<%= table_name.camelize %> < ActiveRecord::Migration
  def self.up
    create_table(:<%= table_name %>) do |t|
      t.string :cloudfuji_id
      t.string :cloudfuji_version

<% for attribute in attributes -%>
      t.<%= attribute.type %> :<%= attribute.name %>
<% end -%>

      t.timestamps
    end

    add_index :<%= table_name %>, :cloudfuji_id, :unique => true
  end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cloudfuji-0.0.46 lib/generators/active_record/templates/migration.rb
cloudfuji-0.0.45 lib/generators/active_record/templates/migration.rb
cloudfuji-0.0.44 lib/generators/active_record/templates/migration.rb
cloudfuji-0.0.43 lib/generators/active_record/templates/migration.rb
cloudfuji-0.0.42 lib/generators/active_record/templates/migration.rb
cloudfuji-0.0.41 lib/generators/active_record/templates/migration.rb
cloudfuji-0.0.40 lib/generators/active_record/templates/migration.rb
cloudfuji-0.0.39 lib/generators/active_record/templates/migration.rb
cloudfuji-0.0.38 lib/generators/active_record/templates/migration.rb
cloudfuji-0.0.37 lib/generators/active_record/templates/migration.rb