kiryl_ch
Explore posts from serversgen_random_uuid not working
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 error
PostgresError: 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!5 replies
how to restore postgres db from dumb?
i was given my db archives because my db was deleted due to migration. I am trying to restore the db data by running this command pg_restore -U <username> -h <host> -p <port> -W -F t -d <db_name> <dump_file_name> but I am getting error pg_restore: error: could not find header for file "toc.dat" in tar archive
33 replies