From 90fbecf61794c2fdf15724b8a42f3c54545ea1b8 Mon Sep 17 00:00:00 2001 From: Jim Lambert Date: Fri, 4 Sep 2020 14:21:41 -0400 Subject: [PATCH] refactor scope_id to be the project of the session's target --- internal/db/migrations/postgres/50_session.up.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/db/migrations/postgres/50_session.up.sql b/internal/db/migrations/postgres/50_session.up.sql index 1b0539c77e..86b877ccd4 100644 --- a/internal/db/migrations/postgres/50_session.up.sql +++ b/internal/db/migrations/postgres/50_session.up.sql @@ -121,9 +121,9 @@ begin; references auth_token (public_id) on delete set null on update cascade, - -- the organization which owns this session + -- the project which owns this session scope_id wt_scope_id -- fk7 - references iam_scope_org (scope_id) + references iam_scope_project (scope_id) on delete set null on update cascade, -- the reason this session ended (null until terminated)