Permalink
Browse files

Patient

  • Loading branch information...
1 parent 64c2cd2 commit f62220a332ddeef3263b241c732a0306498be8a2 @gsterndale gsterndale committed Nov 22, 2011
Showing with 24 additions and 1 deletion.
  1. +3 −0 app/models/patient.rb
  2. +11 −0 db/migrate/20111122142443_create_patients.rb
  3. +10 −1 db/schema.rb
View
@@ -0,0 +1,3 @@
+class Patient < ActiveRecord::Base
+ belongs_to :user
+end
@@ -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
View
@@ -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"

0 comments on commit f62220a

Please sign in to comment.