+6

Custom FK names are not included in generated SQL output for Postgres

j 3 years ago updated 3 years ago 0

I'm using Postgres. I have customized the names of foreign key constraints on a table. However, when I go to "Forward Engineer - Generate SQL" for this table, it appears to be using auto-assigned FK names.

For example, I have a foreign key constraint named "fk_group_id".

I expect the exported SQL to look like this:

CONSTRAINT "fk_group_id" FOREIGN KEY ( "group_id" ) REFERENCES "groups" ( "id" )

...but instead it looks like this:

CONSTRAINT "FK_232" FOREIGN KEY ( "group_id" ) REFERENCES "groups" ( "id" )