diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2025-11-06 16:55:51 -0500 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-11-06 16:55:51 -0500 |
| commit | f65179959cf3f5e9c9dabe5b039bc20e62ce8fd1 (patch) | |
| tree | 0be7e638211c689884b1489decc20b4d68466140 /db | |
| parent | 372d456ae300adc0f321739182b897fbe2164937 (diff) | |
clients: show visits' logger
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20251106214319_add_user_to_visits.rb | 5 | ||||
| -rw-r--r-- | db/schema.rb | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/db/migrate/20251106214319_add_user_to_visits.rb b/db/migrate/20251106214319_add_user_to_visits.rb new file mode 100644 index 0000000..5991aff --- /dev/null +++ b/db/migrate/20251106214319_add_user_to_visits.rb @@ -0,0 +1,5 @@ +class AddUserToVisits < ActiveRecord::Migration[8.1] + def change + add_reference :visits, :user, null: false, foreign_key: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 904f990..9565aa7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[8.1].define(version: 2025_11_03_175602) do +ActiveRecord::Schema[8.1].define(version: 2025_11_06_214319) do # These are extensions that must be enabled in order to support this database enable_extension "pg_catalog.plpgsql" @@ -60,11 +60,14 @@ ActiveRecord::Schema[8.1].define(version: 2025_11_03_175602) do t.bigint "client_id", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.bigint "user_id", null: false t.index ["client_id"], name: "index_visits_on_client_id" t.index ["created_at"], name: "index_visits_on_created_at" + t.index ["user_id"], name: "index_visits_on_user_id" end add_foreign_key "household_members", "clients" add_foreign_key "sessions", "users" add_foreign_key "visits", "clients" + add_foreign_key "visits", "users" end |
