Skip to content

Copy only the selected schemas with data copy --schema (S-007-1..5, S-007-14) #124

Closed

Description

@shipmill-romamo

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-1 comment line).

This is data copy --schema: the selection, the receipt, the row counts, and the plan.

  • S-007-1: Against a source with tables in schemas public, app, and audit, cloudfall data copy <service> --database <db> --source-url-file <file> --schema public --schema app --yes leaves the target with the tables of public and app only, and the receipt's spec.schemas is ["app", "public"]
  • S-007-2: Against the same source, the copy without --schema leaves the target with the tables of all three schemas, as 0.7.0 does, and the receipt's spec.schemas is ["app", "audit", "public"]
  • S-007-3: Each spec.tables[] entry of the receipt has schema, table, and rows, and the entries are exactly the base tables of the selected schemas
  • S-007-4: The rendered row-count query for schemas app and public reads only those two schemas and returns one schema,table,rows line per base table, ordered by schema and table
  • S-007-5: A target with a table in a selected schema refuses the copy with ENGINE_STEP_FAILED naming the table count, as today, and a target whose only table is in a schema not selected goes ahead
  • S-007-14: cloudfall data copy without --yes names the selected schemas in its plan, or says it copies every non-system schema when no --schema is given

Activity

  1. shipmill-romamo commented on Oct 27, 2026

    @shipmill-romamo
    ContributorAuthor

    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.

  2. shipmill-romamo commented on Oct 27, 2026

    @shipmill-romamo
    ContributorAuthor

    The build is in #134, held on one question there: the spec's --schema flag clashes with the --schema every command already has (it prints the command's schema), so the PR names it --source-schema. Answer on #134; nothing else in it departs from the spec. This issue closes when #134 merges.

  3. added 2 commits that reference this issue on Oct 30, 2026
    0e69531
    fb0c7c0
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