Skip to content

Sync fork on 2026-06-03#448

Closed
NFUChen wants to merge 52 commits into
pgplex:mainfrom
NFUChen:sync-fork/2026-06-03
Closed

Sync fork on 2026-06-03#448
NFUChen wants to merge 52 commits into
pgplex:mainfrom
NFUChen:sync-fork/2026-06-03

Conversation

@NFUChen
Copy link
Copy Markdown
Contributor

@NFUChen NFUChen commented Jun 3, 2026

No description provided.

William-W-Chen and others added 30 commits May 14, 2026 22:17
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… flags

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a config file defines [schemas] with a SQL query, plan and apply
commands discover tenant schemas dynamically and iterate over each one.
Dump is excluded since it produces a single template schema.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests cover: no config file, explicit config path, env overrides with
inheritance, schemas section, plan fields, boolean overrides, and
command-level config fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: Add `pgschema.toml` configuration file support
William-W-Chen and others added 22 commits May 15, 2026 09:47
- Renamed `GeneratePlan` to `GenerateSchemaPlan` for clarity.
- Updated `runPlan` and `runPlanMultiSchema` to use the new schema plan generation function.
- Consolidated the `MultiPlan` and `Plan` structures into a unified `Plan` structure that handles both single and multi-schema operations.
- Adjusted methods to work with the new `Plan` structure, including `AddSchema`, `HasAnyChanges`, `ToJSON`, and `ToSQL`.
- Updated tests to reflect the changes in the plan structure and ensure proper functionality.
- Enhanced JSON serialization and deserialization for the new plan structure.
Add infrastructure for column rename detection:
- DiffTypeTableColumnRename enum value with String/UnmarshalJSON
- ColumnRename struct with Old/New column pointers
- RenamedColumns field on tableDiff
- GetObjectName implementation for ColumnRename
- Sorting and initialization for RenamedColumns

Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
Implement columnsMatchForRename to check if two columns at the same
position with identical properties represent a rename. Add
detectColumnRenames to extract rename pairs from added/dropped columns,
and wire it into diffTables.

Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
Add RENAME COLUMN SQL generation in generateAlterTableStatements,
emitted before constraint drops and column drops to preserve data.
Also handle constraint comparison with renamed columns by applying
the rename map to old constraint column names before comparing.

Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
@NFUChen NFUChen closed this Jun 3, 2026
@NFUChen NFUChen deleted the sync-fork/2026-06-03 branch June 3, 2026 12:32
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.

2 participants