You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refuse a data copy the target can't hold before restoring (S-007-6..11) #125
Builds part of spec S-007, docs/specs/007-data-copy-schemas.md (feature issue #82): the acceptance criteria below. Each needs a test that names its id (test_s007_<k>_..., or a proves: S-007-6 comment line).
This is the data copy preflight (missing schemas, extensions, roles, auth. references) and a restore that leaves no partial target. The flag is --source-schema (MCP source_schema), on the maintainer's answer on #134.
S-007-6: --source-schema missing for a schema the source lacks exits PRECONDITION with code data_copy_preflight_refused and missingSchemas of ["missing"], and no dump file is written
S-007-7: A selected table using a type from an extension that is not in the target's pg_available_extensions exits PRECONDITION with code data_copy_preflight_refused naming that extension under extensions, the target holds no new table, and no receipt is written
S-007-8: A policy TO anon, authenticated on a selected table, with neither role on the target, exits PRECONDITION with code data_copy_preflight_refused and roles of ["anon", "authenticated"]
S-007-9: With --source-schema public, a function public.current_tenant() whose body calls auth.uid() and a policy on public.notes whose USING calls auth.uid() are both named under authReferences, and the copy is refused
S-007-10: A source with a missing extension, a missing role, and an auth. reference at once is refused with all three named in one answer
S-007-11: A restore that fails after the preflight passes exits ENGINE_STEP_FAILED, leaves no table in the selected schemas of the target, writes no receipt, and a second run against the same target passes the empty-target check
Triage: implement, for the next release candidate.
The plan: build the criteria listed in the body, as docs/specs/007-data-copy-schemas.md (S-007, approved in #103) says, each with a test that names its id. A departure from a criterion goes back as a question, never a quiet change. Build issues start in order: this one starts once every issue on its Depends on lines has closed. I'll link the PR here.
Triage: implement, now that #124 merged in #134. The flag is --source-schema (MCP source_schema) on @romamo's answer on #134, and the body and spec 007 say so (#157). Since #134, schema names are a PostgresSchemaName (non-empty, at most 63 bytes, no control character or brace); S-007-12 tightens it to the spec's ^[a-z_][a-z0-9_]*$ and refuses a repeated name, which #134 still de-duplicates. S-007-6 also covers a gap #134 left: a named schema missing from the source is skipped while the receipt lists it. An implementer is on it.
Released in v0.8.0rc11 (pre-release).
A plain install gets it with the next stable release.
If you filed this: react 👍 on this comment once it works for you, or reply if it doesn't.
Activity
shipmill-romamo commentedon Oct 27, 2026
Triage: implement, for the next release candidate.
The plan: build the criteria listed in the body, as
docs/specs/007-data-copy-schemas.md(S-007, approved in #103) says, each with a test that names its id. A departure from a criterion goes back as a question, never a quiet change. Build issues start in order: this one starts once every issue on itsDepends onlines has closed. I'll link the PR here.shipmill-romamo commentedon Oct 30, 2026
Triage: implement, now that #124 merged in #134. The flag is
--source-schema(MCPsource_schema) on@romamo's answer on #134, and the body and spec 007 say so (#157). Since #134, schema names are aPostgresSchemaName(non-empty, at most 63 bytes, no control character or brace); S-007-12 tightens it to the spec's^[a-z_][a-z0-9_]*$and refuses a repeated name, which #134 still de-duplicates. S-007-6 also covers a gap #134 left: a named schema missing from the source is skipped while the receipt lists it. An implementer is on it.Refuse a data copy the target can't hold before dumping it (S-007-6..…
shipmill-romamo commentedon Oct 30, 2026
Released in v0.8.0rc11 (pre-release).
A plain install gets it with the next stable release.
If you filed this: react 👍 on this comment once it works for you, or reply if it doesn't.