Changing user's id data type

Is it okay to use uuid as the data type for user's id? Does it have to be text? Will that cause any problems down the line?
export const user = pgTable("user", {
id: uuid("id").primaryKey(),
});
export const user = pgTable("user", {
id: uuid("id").primaryKey(),
});
1 Reply
Ping
Ping3mo ago
You can use uuid, but it will require you to setup your own ID generator in the auth config. You can make an id generator function under advanced.database.generateId.

Did you find this page helpful?