Sync fork on 2026-06-03#448
Closed
NFUChen wants to merge 52 commits into
Closed
Conversation
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>
…ulti-tenant schema handling
feat: Add `pgschema.toml` configuration file support
…p, and plan commands
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.