Class: EasyContactMigration

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/easy_contact/migration/templates/migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/generators/easy_contact/migration/templates/migration.rb', line 2

def change
  create_table :easy_contact_entries do |t|
    t.string :type
    t.string :label
    t.text :content
    t.string :addition
    t.string :extra
    t.string :country
    t.string :locale
    t.boolean :primary
    t.references :contactable

    t.timestamps
  end
  add_index :easy_contact_entries, :contactable_id
end