When dropping a key in the "Foreign keys" tab, the command that is executed is this:
ALTER TABLE "example" DROP FOREIGN KEY "FK_key";
This throws an error:
ERROR: syntax error at or near "FOREIGN" LINE 2: DROP FOREIGN KEY "FK_key"
The proper syntax is (at least one that works) uses DROP CONSTRAINT
instead of DROP FOREIGN KEY
:
ALTER TABLE "example" DROP CONSTRAINT "FK_key";
PostgreSQL version:
$ SELECT VERSION()
PostgreSQL 12.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9), 64-bit