diff options
| author | Fuwn <[email protected]> | 2026-02-10 00:25:43 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-10 00:25:43 -0800 |
| commit | 1bf443a5a98d0c21c0bf622114b8f87fdac8a5a7 (patch) | |
| tree | 7e4f82001192fc10f154f868e4e2f2c2ea9ff3ae /supabase | |
| parent | docs: replace boilerplate README with project documentation (diff) | |
| download | asa.news-1bf443a5a98d0c21c0bf622114b8f87fdac8a5a7.tar.xz asa.news-1bf443a5a98d0c21c0bf622114b8f87fdac8a5a7.zip | |
refactor: use Supabase Auth display name instead of custom column
Migrate existing display names from user_profiles to auth.users
user_metadata. Drop display_name column from user_profiles. Frontend
now reads from auth user metadata and updates via auth.updateUser().
Diffstat (limited to 'supabase')
| -rw-r--r-- | supabase/schema.sql | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/supabase/schema.sql b/supabase/schema.sql index f75fe9e..828ffc6 100644 --- a/supabase/schema.sql +++ b/supabase/schema.sql @@ -2,7 +2,7 @@ -- PostgreSQL database dump -- --- \restrict 3Un8h9VlAyPuVfPugYV7LM7XGnkxI3KC1nPU1aarC0scGxlDzBQB81bgO7tvPsv +-- \restrict x5c7hoIeZadeb9vWOL0aN2XhOidKEkcJTCLPxElLQoDi4K0JeM3w2RYCHdK42ij -- Dumped from database version 17.6 -- Dumped by pg_dump version 17.6 @@ -816,8 +816,8 @@ CREATE OR REPLACE FUNCTION "public"."handle_new_user"() RETURNS "trigger" SET "search_path" TO '' AS $$ begin - insert into public.user_profiles (id, display_name) - values (new.id, coalesce(new.raw_user_meta_data ->> 'display_name', split_part(new.email, '@', 1))); + insert into public.user_profiles (id) + values (new.id); return new; end; @@ -1338,7 +1338,6 @@ ALTER TABLE "public"."user_highlights" OWNER TO "postgres"; CREATE TABLE IF NOT EXISTS "public"."user_profiles" ( "id" "uuid" NOT NULL, - "display_name" "text", "tier" "public"."subscription_tier" DEFAULT 'free'::"public"."subscription_tier" NOT NULL, "feed_count" integer DEFAULT 0 NOT NULL, "folder_count" integer DEFAULT 0 NOT NULL, @@ -3683,5 +3682,5 @@ ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TAB -- PostgreSQL database dump complete -- --- \unrestrict 3Un8h9VlAyPuVfPugYV7LM7XGnkxI3KC1nPU1aarC0scGxlDzBQB81bgO7tvPsv +-- \unrestrict x5c7hoIeZadeb9vWOL0aN2XhOidKEkcJTCLPxElLQoDi4K0JeM3w2RYCHdK42ij |