Skip to content
This repository has been archived by the owner on Feb 6, 2019. It is now read-only.

Commit

Permalink
Patient
Browse files Browse the repository at this point in the history
  • Loading branch information
gsterndale committed Nov 22, 2011
1 parent 64c2cd2 commit f62220a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/models/patient.rb
@@ -0,0 +1,3 @@
class Patient < ActiveRecord::Base
belongs_to :user
end
11 changes: 11 additions & 0 deletions db/migrate/20111122142443_create_patients.rb
@@ -0,0 +1,11 @@
class CreatePatients < ActiveRecord::Migration
def change
create_table :patients do |t|
t.references :user
t.string :name

t.timestamps
end
add_index :patients, :user_id
end
end
11 changes: 10 additions & 1 deletion db/schema.rb
Expand Up @@ -11,14 +11,23 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20111122142342) do
ActiveRecord::Schema.define(:version => 20111122142443) do

create_table "organizations", :force => true do |t|
t.string "name"
t.datetime "created_at"
t.datetime "updated_at"
end

create_table "patients", :force => true do |t|
t.integer "user_id"
t.string "name"
t.datetime "created_at"
t.datetime "updated_at"
end

add_index "patients", ["user_id"], :name => "index_patients_on_user_id"

create_table "users", :force => true do |t|
t.integer "organization_id"
t.string "name"
Expand Down

0 comments on commit f62220a

Please sign in to comment.