Skip to content

The data copy preflight doesn't name extensions in other schemas or auth references outside functions and policies #175

Open

Description

@shipmill-romamo

Split from #173 (items 2 and 3), found in the review of #171.

The data copy preflight (spec S-007, docs/specs/007-data-copy-schemas.md) doesn't name two Supabase shapes, so the copy fails at pg_restore with ENGINE_STEP_FAILED and a raw restore error instead of a data_copy_preflight_refused finding. Both still fail safe: --single-transaction rolls the restore back.

  1. An extension installed in an unselected schema. Supabase installs extensions in schema extensions. Copying --source-schema public dumps CREATE EXTENSION ... WITH SCHEMA extensions, which fails on a target without that schema. S-007 says nothing about it: the copy could refuse with a new finding, or create the extension in another schema
  2. auth. references beyond functions and policies. A foreign key to auth.users, a column DEFAULT auth.uid(), and a view calling auth. aren't named under authReferences, which S-007 limits to functions and policies

Both change what S-007 specifies, so they need a spec change before any build.

Related: #82, #125, #173.

Activity

  1. shipmill-romamo commented on Oct 30, 2026

    @shipmill-romamo
    ContributorAuthor

    Triage: opportunity. Serves: G-3. The data copy preflight would name two more Supabase shapes (an extension installed in an unselected schema, and auth. references in foreign keys, column defaults and views): new behaviour beyond spec S-007, not a bug fix or a contract tweak. It goes to product intake, which groups it with the requests for the same outcome into one opportunity issue; the maintainer accepts or declines that opportunity, and an accepted one gets a spec before anything is built. Follow this issue for the link to the opportunity.

    Today both shapes fail safe: the restore rolls back whole and the copy exits ENGINE_STEP_FAILED.

  2. shipmill-romamo commented on Oct 30, 2026

    @shipmill-romamo
    ContributorAuthor

    Triage: opportunity: grouped into #186 with 0 other requests for the same outcome. Follow that issue for the maintainer's decision.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions