Permalink
Browse files

Visit

  • Loading branch information...
1 parent d6fd00c commit b1c4dca598ea25d8e866b179b91a1debcfbf3096 @gsterndale gsterndale committed Nov 22, 2011
Showing with 24 additions and 1 deletion.
  1. +3 −0 app/models/visit.rb
  2. +11 −0 db/migrate/20111122142647_create_visits.rb
  3. +10 −1 db/schema.rb
View
@@ -0,0 +1,3 @@
+class Visit < ActiveRecord::Base
+ belongs_to :patient_authorization
+end
@@ -0,0 +1,11 @@
+class CreateVisits < ActiveRecord::Migration
+ def change
+ create_table :visits do |t|
+ t.references :patient_authorization
+ t.string :name
+
+ t.timestamps
+ end
+ add_index :visits, :patient_authorization_id
+ end
+end
View
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20111122142543) do
+ActiveRecord::Schema.define(:version => 20111122142647) do
create_table "organizations", :force => true do |t|
t.string "name"
@@ -46,4 +46,13 @@
add_index "users", ["organization_id"], :name => "index_users_on_organization_id"
+ create_table "visits", :force => true do |t|
+ t.integer "patient_authorization_id"
+ t.string "name"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "visits", ["patient_authorization_id"], :name => "index_visits_on_patient_authorization_id"
+
end

0 comments on commit b1c4dca

Please sign in to comment.