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/0080_slim_quasar.sql | |
3/25 까지의 대표님 작업사항
Diffstat (limited to 'db/migrations/0080_slim_quasar.sql')
| -rw-r--r-- | db/migrations/0080_slim_quasar.sql | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/db/migrations/0080_slim_quasar.sql b/db/migrations/0080_slim_quasar.sql new file mode 100644 index 00000000..e7d4e183 --- /dev/null +++ b/db/migrations/0080_slim_quasar.sql @@ -0,0 +1,4 @@ +DROP VIEW "public"."user_view";--> statement-breakpoint +CREATE VIEW "public"."user_view" AS (select "users"."id" as "user_id", "users"."name" as "user_name", "users"."email" as "user_email", "users"."domain" as "user_domain", "users"."image_url" as "user_image", "vendors"."id" as "company_id", "vendors"."vendor_name" as "company_name", + array_agg("roles"."name") + as "roles", "users"."created_at" as "created_at" from "users" left join "vendors" on "users"."company_id" = "vendors"."id" left join "user_roles" on "users"."id" = "user_roles"."user_id" left join "roles" on "user_roles"."role_id" = "roles"."id" group by "users"."id", "companies"."id");
\ No newline at end of file |
