Database Foreign Key Deferrable
Hi,
When using a postgres database connection and using the modify on a foreign key constraint, the deferrable setting seems to be incorrect. The popup inside IntelliJ shows 'not deferrable' while PGAdmin3 says deferrable, initially deferred. This might be a bug? Anyone else having this issue?
Kind Regards.
Please sign in to leave a comment.
Hello Jan,
Could you please attach the actual DDL for the table? Also please post results from Copy DDL action for this table from IDEA. Thanks.
DDL used to create the table:
CREATE TABLE testdeferrable
(
id numeric(19,0) NOT NULL,
version numeric(19,0) NOT NULL,
foreign_key_column numeric(19,0) NOT NULL,
CONSTRAINT pk_id PRIMARY KEY (id),
CONSTRAINT fk_foreign_key_column FOREIGN KEY (foreign_key_column)
REFERENCES party (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED
)
DDL generated by IDEA:
CREATE TABLE testdeferrable
(
id NUMERIC(19) PRIMARY KEY NOT NULL,
version NUMERIC(19) NOT NULL,
foreign_key_column NUMERIC(19) NOT NULL,
CONSTRAINT fk_foreign_key_column FOREIGN KEY (foreign_key_column) REFERENCES party (id)
);
Could you please try IDEA 16 preview build from https://confluence.jetbrains.com/display/IDEADEV/IDEA+16+EAP .
Just tried the EAP version, but still the same result.
I've got the same issue! it's so annoying!
My workaround is to add the connections via PgAdmin and then reconnect to the database in DataGrid.