da1zHOBBY
a year ago
hi. I am trying to use postgress db provisioned on railway with drizzle. my schema look like id: uuid('id').default(sql'gen_random_uuid()')
but on insert into this db I get errorPostgresError: null value in column "id" of relation "file" violates not-null constraint
is it possible that my db does not have this function? if so what should I do to create column with autogenerated uuid ? thanks!
0 Replies
a year ago
you would first need to enable the pgcrypto extension, do that by running this query -
CREATE EXTENSION pgcrypto;
Status changed to Solved railway[bot] • about 1 year ago