Skip to content

{WIP} Implement schema editing.#291

Open
dimitri wants to merge 4 commits into
mainfrom
feature/edit-schema
Open

{WIP} Implement schema editing.#291
dimitri wants to merge 4 commits into
mainfrom
feature/edit-schema

Conversation

@dimitri

@dimitri dimitri commented May 17, 2023

Copy link
Copy Markdown
Owner

Add a facility to dump DDL commands for a specific set of tables, and include also their indexes and the foreign key definitions that point to selected tables. The command is pgcopydb dump sql-files --filters ...

Each SQL object definition is saved in their own file: .sql

Later implement a way to use the saved files instead of the pg_dump archive contents when preparing the schema on the target database, in a way that if the SQL files have been edited the new schema is installed there.

See #263.

@dimitri dimitri force-pushed the feature/edit-schema branch from 9349d30 to faa6de7 Compare May 22, 2023 12:15
dimitri added 3 commits May 25, 2023 13:29
Add a facility to dump DDL commands for a specific set of tables, and
include also their indexes and the foreign key definitions that point to
selected tables. The command is pgcopydb dump sql-files --filters ...

Each SQL object definition is saved in their own file: <oid>.sql

Later implement a way to use the saved files instead of the pg_dump archive
contents when preparing the schema on the target database, in a way that if
the SQL files have been edited the new schema is installed there.
When editing the schema, the foreign keys that point from selected tables
are only half the story.
@dimitri dimitri force-pushed the feature/edit-schema branch from faa6de7 to da70702 Compare May 25, 2023 11:29
Needs a recursive query in schema.c to reach from the table to the column to
its data type, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant