Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rudrakshsisodia
Copy link

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:

  • 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:

  • Supports true cross-server/cross-database migration

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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