diff options
| author | mo khan <mo.khan@gmail.com> | 2020-03-15 13:06:18 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-03-15 13:06:18 -0600 |
| commit | 6d24a76ae681de7d8e14fb3dd1334532abdba125 (patch) | |
| tree | 0f92199ed05ded5fd34813678a2273010b5fc71b /rvh/db | |
| parent | 4121bb5ceeeadbd3e092c64fc3e1c8cf842d23b2 (diff) | |
Create volunteers
Diffstat (limited to 'rvh/db')
| -rw-r--r-- | rvh/db/migrate/20200315190540_create_volunteers.rb | 10 | ||||
| -rw-r--r-- | rvh/db/schema.rb | 11 |
2 files changed, 20 insertions, 1 deletions
diff --git a/rvh/db/migrate/20200315190540_create_volunteers.rb b/rvh/db/migrate/20200315190540_create_volunteers.rb new file mode 100644 index 0000000..923fc47 --- /dev/null +++ b/rvh/db/migrate/20200315190540_create_volunteers.rb @@ -0,0 +1,10 @@ +class CreateVolunteers < ActiveRecord::Migration[6.0] + def change + create_table :volunteers do |t| + t.references :account, null: false, foreign_key: true + t.text :skill, null: false + + t.timestamps + end + end +end diff --git a/rvh/db/schema.rb b/rvh/db/schema.rb index 1b8e238..7a55399 100644 --- a/rvh/db/schema.rb +++ b/rvh/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_03_15_183903) do +ActiveRecord::Schema.define(version: 2020_03_15_190540) do create_table "accounts", force: :cascade do |t| t.string "name", null: false @@ -111,6 +111,14 @@ ActiveRecord::Schema.define(version: 2020_03_15_183903) do t.index ["patient_id"], name: "index_visits_on_patient_id" end + create_table "volunteers", force: :cascade do |t| + t.integer "account_id", null: false + t.text "skill", null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["account_id"], name: "index_volunteers_on_account_id" + end + add_foreign_key "beds", "care_centres" add_foreign_key "beds", "patients" add_foreign_key "consumptions", "items" @@ -122,4 +130,5 @@ ActiveRecord::Schema.define(version: 2020_03_15_183903) do add_foreign_key "treatments", "employees" add_foreign_key "treatments", "patients" add_foreign_key "visits", "patients" + add_foreign_key "volunteers", "accounts" end |
