2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/generators/active_content/templates/profile.rb', line 2
def change
create_table :profiles do |t|
t.string :first_name
t.string :last_name
t.text :bio
t.string :website
t.string :phone
t.string :mobile
t.string :fax
t.string :address
t.string :city
t.string :province
t.string :country
t.string :postal_code
t.string :image
t.references :profileable, polymorphic: true, index: false
t.timestamps
end
add_index :profiles, [:profileable_type, :profileable_id], unique: true, name: :index_profiles_on_profilable_attribute
end
|