Skip to content

Conversation

jawad-arb123
Copy link
Member

Problem

The TestMigrateConstraint test fails on Oracle with the following error:
ALTER TABLE "user_speaks" ADD CONSTRAINT "fk_users_languages" FOREIGN KEY ("user_id") REFERENCES "users"("id") ORA-02275: such a referential constraint already exists in the table

This happens because Oracle already creates a foreign key on user_speaks.user_id → users.id
(named fk_user_speaks_user). Oracle does not allow creating another foreign key with the same
definition but a different name (fk_users_languages).

Fix

Removed "Languages", "fk_users_languages" from the test list in TestMigrateConstraint. - This avoids attempting to create a duplicate foreign key that Oracle rejects.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 2, 2025
@jawad-arb123 jawad-arb123 removed the request for review from norah-li September 3, 2025 11:26
@ting-lan-wang ting-lan-wang merged commit 37634b3 into main Sep 9, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants