Default UUID as text type

What is the recommended way to set the id (primary key) field as a text type with a default value of uuid
4 Replies
Angelelz
Angelelz14mo ago
Depends on your driver and dialect I guess dialect only
jakeleventhal
jakeleventhalOP14mo ago
pg i'd prefer to use uuid type but will be best to migrate one thing at a time so need an interim solution
Angelelz
Angelelz14mo ago
I think that you have defaulRandom in Pg text and varchar, you might want to look at the docs
jakeleventhal
jakeleventhalOP14mo ago
cool stuff

Did you find this page helpful?