diff --git a/apps/browser/supabase/migrations/20240124165527_workspace_files.sql b/apps/browser/supabase/migrations/20240124165527_workspace_files.sql index 5db883f0..3b0ff68e 100644 --- a/apps/browser/supabase/migrations/20240124165527_workspace_files.sql +++ b/apps/browser/supabase/migrations/20240124165527_workspace_files.sql @@ -18,8 +18,9 @@ INSERT INTO "public"."workspace_files" ("chat_id", "path") SELECT "path_tokens"[1]::uuid as "chat_id", "name" as "path" -from +FROM storage.objects +JOIN chats ON chats.id = "path_tokens"[1]::uuid where bucket_id = 'workspaces';