darold / ora2pg

Ora2Pg is a free tool used to migrate an Oracle database to a PostgreSQL compatible schema. It connects your Oracle database, scan it automatically and extracts its structure or data, it then generates SQL scripts that you can load into PostgreSQL.
http://www.ora2pg.com/
GNU General Public License v3.0
978 stars 341 forks source link

CREATE SCHEMA after imports that are using that schema #1665

Closed mgerhardy closed 10 months ago

mgerhardy commented 11 months ago

For some packages (not all) the CREATE SCHEMA command happens after an include of a sql file that already uses the schema.

This might happen if you use CREATE DOMAIN to specify types and use those types in other packages already.

Is there a way to export the packages in a particular order? So that we can export our type packages first, and then the remaining packages?

mgerhardy commented 10 months ago

We've found out, that the type conversion is not working anyway. So we exclude the custom type package in the export and had to manually convert those types. Last but not least we had to ensure that the custom_types.sql is imported as first step - as those types were used in a lot of dependent packages