sms-pager/db/migrate/20150904033833_init.rb

26 lines
537 B
Ruby
Raw Normal View History

2015-09-12 15:37:05 -05:00
class Init < ActiveRecord::Migration
def up
create_table :people do |t|
t.string :first_name
t.string :last_name
t.string :phone
t.string :email
t.boolean :admin
t.boolean :staff
end
create_table :parenthoods do |t|
t.integer :person_id
t.integer :child_id
end
create_table :children do |t|
t.string :first_name
t.string :last_name
end
add_index :people, :phone
add_index :parenthoods, [:person_id, :child_id], name: 'parentship'
end
end