Sha256: 91949b971fd01eb50d75453725cc603db55ead3a5cd407c39aa1749d0b280042
Contents?: true
Size: 711 Bytes
Versions: 7
Compression:
Stored size: 711 Bytes
Contents
class AddNinshoTo<%= table_name.camelize %> < ActiveRecord::Migration def self.up change_table(:<%= table_name %>) do |t| <%= migration_data -%> <% attributes.each do |attribute| -%> t.<%= attribute.type %> :<%= attribute.name %> <% end -%> # Uncomment below if timestamps were not included in your original model. # t.timestamps end add_index :<%= table_name %>, :user_id end def self.down # By default, we don't want to make any assumption about how to roll back a migration when your # model already existed. Please edit below which fields you would like to remove in this migration. raise ActiveRecord::IrreversibleMigration end end
Version data entries
7 entries across 7 versions & 1 rubygems