Sha256: 32d615938d4157259657a74836c510f4d95c3a6b263353396e0f8b0dea0d0faf
Contents?: true
Size: 537 Bytes
Versions: 7
Compression:
Stored size: 537 Bytes
Contents
class <%= migration_class_name %> < ActiveRecord::Migration def change create_table :<%= table_name %> do |t| <% attributes.each do |attribute| -%> t.<%= attribute.type %> :<%= attribute.name %><%= attribute.inject_options %> <% end -%> t.integer :sender_id t.timestamp :sent_at t.string :subject t.timestamps end <% attributes_with_index.each do |attribute| -%> add_index :<%= table_name %>, :<%= attribute.index_name %><%= attribute.inject_index_options %> <% end -%> end end
Version data entries
7 entries across 7 versions & 1 rubygems