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

Transporter: schema feedback #5883

Closed
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@
title: "Applying constraints"
---

After the migration is completed, apply any existing constraints to the new database.
Before starting the migration with EDB Transporter, you [prepared the schema](prepare_schema). Now, re-apply the constraints that were not included in migration.

## Primary Key and Unique constraints

For **Primary Key** and **Unique** constraints, you have already created the tables and constraints in the target Postgres database. This allowed EDB Transporter to map them to the source objects and migrated data sucessfuly. You don't need do to anything else.

## Other constraints

For constraints that are not of the type **Primary Key**, or **Unique**, you can now re-apply them. See [Asessment and migration tools](prepare_schema/#assessment-and-migration-tools) for an overview of tools you can use to ensure the constraint syntax is compatible with Postgres, or to help you convert it.
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
---
title: "Preparing schema"
title: "Preparing your schema"
---

Use [EDB Migration Portal](https://www.enterprisedb.com/docs/migration_portal/latest/) to assess Oracle database sources for schema compatibility before starting the data migration process. Address incompatible schemas or exclude them from the migration and migrate the schema to the new database **without applying constraints**.
Before you configure a Transporter migration, you must prepare your schema. Your schema's `table` objects and some `constraints` must be prepared before the Transporter migration takes place, whereas others must be applied [after the migration is completed](apply_constraints).

## Prerequisite

You created a schema in the target database with the same name as the schema in the source database.

## Prepare your table objects

1. Use any of EDB's supported [asessment and migration tools](#assessment-and-migration-tools) to ensure your `table` objects are compatible with Postgres. If there are incompatibilities, [Migration Portal](/migration_portal/latest/03_mp_using_portal/03_mp_quick_start/) can help you convert them.

1. Connect to the target database and create `table` objects with the Postgres-compatible syntax.

## Prepare your constraints

### Primary Key and Unique constraints

Ensure you create **Primary Key** and **Unique** constraints in the target Postgres database before performing the Transporter migration. This ensures that the migration can validate and carry them over to the target database and doesn't present any errors.

1. Use any of EDB's supported [asessment and migration tools](#assessment-and-migration-tools) to ensure your `constraints` are compatible with Postgres. If there are incompatibilities, [Migration Portal](/migration_portal/latest/03_mp_using_portal/03_mp_quick_start/) can help you convert them.

1. Connect to the target database and create ONLY **Public Key** and **Unique** constraints with the Postgres-compatible syntax. Other constraint types must be applied after you complete the migration with EDB Transporter.

### Other constraints

Keep track of the constraints you excluded (all constraints that are not of the type **Primary Key**, or **Unique**) to ensure you [re-apply them](apply_constraints) after the migration is completed.

## Assessment and migration tools

These tools can help you convert query statements (DDL files) to Postgres.

- You can use [EDB Migration Portal](/migration_portal/latest/03_mp_using_portal/03_mp_quick_start/) to assess your schemas, convert incompatible statements, and generate export files with Postgres-compatible statements. Use the converted statements to create `tables` and `constraints`.

- You can use [EDB Migration Toolkit](/migration_toolkit/latest/07_invoking_mtk/) to generate export files that contain a list of compatible and converted statements. The export excludes incompatible statements. Use the converted statements to create `tables` and `constraints`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- You can use [EDB Migration Toolkit](/migration_toolkit/latest/07_invoking_mtk/) to generate export files that contain a list of compatible and converted statements. The export excludes incompatible statements. Use the converted statements to create `tables` and `constraints`.
- You can use [EDB Migration Toolkit](/migration_toolkit/latest/07_invoking_mtk/) in offline-mode to generate export files that contain a list of compatible and converted statements. The export excludes incompatible statements. Use the converted statements to create `tables` and `constraints`.


- You can manually create and populate your schema with tables and constraints. Ensure the table and constraint statements are compatible with Postgres.