Closed arthurfranca closed 7 years ago
Hey,
you are right, that was a bug. But is has nothing to do with the linked issue.
The bug was in the postgres driver which loads the table definition. The code naively checks only for serial auto increment and adds a validatesPresenceOf
validation for all attributes with a NOT NULL
constraint, except for serials.
I wrote a test for that case and fixed it in version 1.10.17
.
Thanks, Philipp
I have a table column
id
of typeUUID
, as primary key (not null constraint), with a default set togen_random_uuid()
from pgcrypto extensionIt works if i use sql like:
insert into test_table ("id") values ('84df10c9-517a-4dff-a96a-5799c30af0c4');
insert into test_table ("id") values (gen_random_uuid());
insert into test_table ("id") values (DEFAULT);
insert into test_table ("another_column") values ('i am not setting uuid');
Won't work when i do:
Possibly a bug similar to this issue