Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{WIP} Implement schema editing. #291

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

{WIP} Implement schema editing. #291

wants to merge 4 commits into from

Conversation

dimitri
Copy link
Owner

@dimitri dimitri commented May 17, 2023

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.

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.
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