Skip to content

migrate/supabase: the public.users / profile-mirror pattern hard-blocks (name collides with auth.users) #304

Description

@Sorcecoder

Migrating the official supabase slack-clone example:

A public table users whose PK is a FK to auth.users (the near-universal Supabase "profile mirror" convention) produces a blocking gap: "table maps to the entity name User, which the auth mapping reserves for auth.users." No auto-resolution — the migrator stops rather than merging or renaming.

Cascade: because public.users is also in the supabase_realtime publication, it also yields a blocking realtime_channel gap (the users stream is dropped — only 2 of 3 published tables reach realtime.changes).

Impact: the profile-mirror table is present in a large fraction of real Supabase projects, so this blocks the common case.

Suggested: recognize a FK-to-auth.users profile table and merge its columns into the auth-derived users module (or model it under a non-colliding name) rather than hard-blocking. Found via the migration eval.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions