You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems postgresql schemas get the same name for all constraints for a table (which obviously won't work)
I tried setting up a simple table with a id auto_increment primary key and a code text column that's unique:
This is what it generated:
CREATE TABLE test (
id BIGSERIAL,
code TEXT NOT NULL
);
ALTER TABLE test ADD CONSTRAINT test_pkey PRIMARY KEY (id);
ALTER TABLE test ADD CONSTRAINT test_pkey UNIQUE (code);
Notice how they are both named test_pkey. This does not work.
If I give the constraints specific names, it still doesn't change this behavior.
The text was updated successfully, but these errors were encountered:
It seems postgresql schemas get the same name for all constraints for a table (which obviously won't work)
I tried setting up a simple table with a
id
auto_increment primary key and acode
text column that's unique:This is what it generated:
Notice how they are both named
test_pkey
. This does not work.If I give the constraints specific names, it still doesn't change this behavior.
The text was updated successfully, but these errors were encountered: