Skip to content

referenced foreign keys with upper case name do not work #196

@OrNixx

Description

@OrNixx

Hello. Trying to alter table slot and got an error:
{"name":"pg-online-schema-change","hostname":"9aaea23c9975","pid":1,"level":60,"time":"2025-08-06T20:58:05.987+00:00","v":0,"msg":"Something went wrong: ERROR: constraint "fk_booking_slot_slot_id" of relation "booking" does not exist\n","e":"ERROR: constraint "fk_booking_slot_slot_id" of relation "booking" does not exist\n","version":"0.9.10"}

\d slot
...
"FK_booking_slot_slot_id" FOREIGN KEY (slot_id) REFERENCES slot(id) ON DELETE RESTRICT
...

renaming fk to lower-case is working workaround
ALTER TABLE booking RENAME CONSTRAINT "FK_booking_slot_slot_id" TO fk_booking_slot_slot_id;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions