diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-03-26 00:37:41 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-03-26 00:37:41 +0000 |
| commit | e0dfb55c5457aec489fc084c4567e791b4c65eb1 (patch) | |
| tree | 68543a65d88f5afb3a0202925804103daa91bc6f /db/migrations/0005_loud_whizzer.sql | |
3/25 까지의 대표님 작업사항
Diffstat (limited to 'db/migrations/0005_loud_whizzer.sql')
| -rw-r--r-- | db/migrations/0005_loud_whizzer.sql | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/db/migrations/0005_loud_whizzer.sql b/db/migrations/0005_loud_whizzer.sql new file mode 100644 index 00000000..cfd7a735 --- /dev/null +++ b/db/migrations/0005_loud_whizzer.sql @@ -0,0 +1 @@ +CREATE VIEW "public"."role_view" AS (select "roles"."id", "roles"."name", "roles"."description", "roles"."domain", "roles"."created_at", "roles"."company_id", "companies"."name", COUNT("users"."id") as "user_count" from "roles" left join "user_roles" on "user_roles"."role_id" = "roles"."id" left join "users" on "users"."id" = "user_roles"."user_id" left join "companies" on "roles"."company_id" = "companies"."id" group by "roles"."id", "companies"."id");
\ No newline at end of file |
