Add cross-server schema migration for Postgres to Postgres#3703
Open
rudrakshsisodia wants to merge 1 commit intoPeerDB-io:mainfrom
Open
Add cross-server schema migration for Postgres to Postgres#3703rudrakshsisodia wants to merge 1 commit intoPeerDB-io:mainfrom
rudrakshsisodia wants to merge 1 commit intoPeerDB-io:mainfrom
Conversation
|
|
This implementation adds support for migrating database schema objects (indexes, triggers, constraints) from source to destination during Postgres-to-Postgres mirror creation. Key Changes: - Added source_name field to SetupNormalizedTableBatchInput proto - Implemented migrateSchemaMetadata() for cross-server migration - Added schema extraction functions (GetTableIndexes, GetTableTriggers, GetTableConstraints) - Added schema creation functions (CreateIndexes, CreateTriggers, CreateConstraints) - Added comprehensive E2E tests for schema migration Implementation follows the same cross-server pattern as data replication: - Get source connector to read schema objects - Get destination connector to create schema objects - Supports true cross-server/cross-database migration Tests: - Test_Schema_Migration_Indexes: Verifies index migration - Test_Schema_Migration_Triggers: Verifies trigger migration - Test_Schema_Migration_Constraints: Verifies constraint migration - Test_Schema_Migration_Combined: Verifies all together - Test_Schema_Migration_InitialSnapshotOnly: Verifies snapshot-only mirrors
652b776 to
21cda7a
Compare
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.
feat: This implementation adds support for migrating database schema objects (indexes, triggers, constraints) from source to destination during Postgres-to-Postgres mirror creation.
Key Changes:
source_namefield to SetupNormalizedTableBatchInput protomigrateSchemaMetadata()for cross-server migrationGetTableIndexes,GetTableTriggers,GetTableConstraints)CreateIndexes,CreateTriggers,CreateConstraints)Implementation follows the same cross-server pattern as data replication: