Sha256: 55833e796e836b943974deab8f08b8662a02b5777049a8e400ea02176a32b41b

Contents?: true

Size: 348 Bytes

Versions: 45

Compression:

Stored size: 348 Bytes

Contents

class CreateContacts < ActiveRecord::Migration
  
  def self.up
    create_table :contacts do |t|
      t.string :sender_name
      t.string :sender_email
      t.text :body
      
      t.timestamps
    end
    add_index :contacts, :updated_at
  end
  
  def self.down
    drop_table :contacts
    remove_index :contacts, :updated_at
  end
  
end

Version data entries

45 entries across 45 versions & 2 rubygems

Version Path
tkh_content-0.3.1 lib/generators/tkh_content/create_or_update_migrations/templates/create_contacts.rb
tkh_content-0.3 lib/generators/tkh_content/create_or_update_migrations/templates/create_contacts.rb
tkh_content-0.2.1 lib/generators/tkh_content/create_or_update_migrations/templates/create_contacts.rb
tkh_content-0.2 lib/generators/tkh_content/create_or_update_migrations/templates/create_contacts.rb
tkh_content-0.1.15 lib/generators/tkh_content/create_or_update_migrations/templates/create_contacts.rb