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

Optimized for migrations from Oracle to Aurora Postgres 10 #15

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

nagmesh
Copy link

@nagmesh nagmesh commented Jun 18, 2019

Issue #, if available:
The SCT generated scripts were erroring out
Some columns and descriptions were not clear
Description of changes:
Changed the columns, indexes and some description to make migrations smoother specifically from Oracle 12c to Aurora Postgres 10.7

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

nagmesh added 12 commits April 28, 2019 00:24
removed the constraint that was not creating a primary key
PKs were created in both create index script and here
ALTER TABLE dms_sample.seat
ADD CONSTRAINT s_sport_location_fk FOREIGN KEY (sport_location_id)
REFERENCES dms_sample.sport_location (id)
ON DELETE NO ACTION; 

ALTER TABLE dms_sample.sporting_event
ADD CONSTRAINT se_location_id_fk FOREIGN KEY (location_id)
REFERENCES dms_sample.sport_location (id)
ON DELETE NO ACTION;

error out  when sct is used
error is
ERROR:  foreign key constraint "s_sport_location_fk" cannot be implemented
DETAIL:  Key columns "sport_location_id" and "id" are of incompatible types: double precision and numeric.

ERROR:  foreign key constraint "se_location_id_fk" cannot be implemented
DETAIL:  Key columns "location_id" and "id" are of incompatible types: double precision and numeric.
converting to aurora postgres throws error
CREATE INDEX set_ev_id_tkholder_id_idx
ON dms_sample.sporting_event_ticket
USING BTREE (sporting_event_id ASC, ticketholder_id ASC, '' ASC);
CREATE INDEX
psql:create-schema.sql:443: ERROR:  syntax error at or near "''"
LINE 3: ... BTREE (sporting_event_id ASC, ticketholder_id ASC, '' ASC);
                                                               ^
If the commands without altering schema are run they error out

SQL> exec ticketManagement.generateTicketActivity(0.01,1000);
BEGIN ticketManagement.generateTicketActivity(0.01,1000); END;

      *
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'TICKETMANAGEMENT.GENERATETICKETACTIVITY' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


SQL> alter session set current_schema=dms_sample;

Session altered.
if this is not done the sql errors out
removed the older changes
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.

1 participant