ora2pg icon indicating copy to clipboard operation
ora2pg copied to clipboard

export_sequence should recognize create_schema config

Open machinehum opened this issue 5 months ago • 4 comments

When CREATE_SCHEMA config is disabled, the sequence export still tries to create the schema, resulting in a permission failure if the Postgres user can't create the schema. This is an issue in environments where the person using Ora2Pg has rights to create tables etc. and insert data, but not create schemas (schema creation is done by a DBA, for example).

This should be an easy fix by changing lib/Ora2Pg.pm:5472 from:

if ($self->{export_schema} && ($self->{pg_schema} || $self->{schema})) {

to

if ($self->{export_schema} && $self->{create_schema} && ($self->{pg_schema} || $self->{schema})) {

machinehum avatar Sep 11 '24 18:09 machinehum