From 9da0bc1dc694b1e662a8131511a5ad9277c02df6 Mon Sep 17 00:00:00 2001 From: KannoStanfoot Date: Sat, 6 Jul 2024 11:27:43 +0900 Subject: [PATCH 1/3] :fix add image_file_name column on attendees table --- supabase/schema.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/supabase/schema.sql b/supabase/schema.sql index 084efbb8..4c891930 100644 --- a/supabase/schema.sql +++ b/supabase/schema.sql @@ -88,6 +88,8 @@ create table if not exists public.attendees ( updated_at timestamp with time zone default timezone('utc' :: text, now()) not null ); +ALTER TABLE public.attendees ADD COLUMN image_file_name varchar(100) not null unique; + -- *** Function definitions *** create or replace function public.create_admin_user() returns trigger as $ $ begin -- If user_role is 'admin', insert data into admin_users table From 3a6807d8ce46bcc46ed6a6d39cd7ee0e2a9fdb3f Mon Sep 17 00:00:00 2001 From: KannoStanfoot Date: Sat, 6 Jul 2024 11:49:32 +0900 Subject: [PATCH 2/3] :fix update definition of image_file_name column --- supabase/schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supabase/schema.sql b/supabase/schema.sql index 4c891930..285d65ac 100644 --- a/supabase/schema.sql +++ b/supabase/schema.sql @@ -88,7 +88,7 @@ create table if not exists public.attendees ( updated_at timestamp with time zone default timezone('utc' :: text, now()) not null ); -ALTER TABLE public.attendees ADD COLUMN image_file_name varchar(100) not null unique; +ALTER TABLE public.attendees ADD COLUMN image_file_name uuid not null unique default uuid_generate_v4(); -- *** Function definitions *** create From 36560a9c543e2aba20648efabc462a399fd96b5b Mon Sep 17 00:00:00 2001 From: KannoStanfoot Date: Sat, 6 Jul 2024 12:08:40 +0900 Subject: [PATCH 3/3] feat(schema): update Supabase type definitions --- apps/web/app/types/generated/supabase.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/web/app/types/generated/supabase.ts b/apps/web/app/types/generated/supabase.ts index 220e7daf..3af0d4e8 100644 --- a/apps/web/app/types/generated/supabase.ts +++ b/apps/web/app/types/generated/supabase.ts @@ -59,6 +59,7 @@ export type Database = { display_name: string | null email: string id: string + image_file_name: string provider: string receipt_id: string role: string | null @@ -72,6 +73,7 @@ export type Database = { display_name?: string | null email: string id?: string + image_file_name?: string provider: string receipt_id: string role?: string | null @@ -85,6 +87,7 @@ export type Database = { display_name?: string | null email?: string id?: string + image_file_name?: string provider?: string receipt_id?: string role?: string | null