cirandas.net

ref: master

db/migrate/010_create_person_infos.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class CreatePersonInfos < ActiveRecord::Migration
  def self.up
    create_table :person_infos do |t|
      t.column :name,                :string
      t.column :photo,               :text
      t.column :contact_information, :text
      t.column :birth_date,          :date
      t.column :sex,                 :string
      t.column :address,             :text
      t.column :city,                :string
      t.column :state,               :string
      t.column :country,             :string

      t.column :created_at,          :datetime
      t.column :updated_at,          :datetime
      t.column :person_id,           :integer
    end
  end

  def self.down
    drop_table :person_infos
  end
end