mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-27 17:36:42 -05:00
fix(db): postgres - explicitly define pg_catalog for gen_random_uuid() (#5832)
Co-authored-by: Jakub Kołodziejczak <jakub.kolodziejczak@databricks.com>
This commit is contained in:
committed by
GitHub
parent
3b12fafb02
commit
b1b6c49e7e
@@ -416,7 +416,7 @@ export async function getMigrations(config: BetterAuthOptions) {
|
||||
if (dbType === "postgres") {
|
||||
return col
|
||||
.primaryKey()
|
||||
.defaultTo(sql`gen_random_uuid()`)
|
||||
.defaultTo(sql`pg_catalog.gen_random_uuid()`)
|
||||
.notNull();
|
||||
} else if (dbType === "mysql" || dbType === "mssql") {
|
||||
return col.primaryKey().defaultTo(sql`uuid()`).notNull();
|
||||
|
||||
Reference in New Issue
Block a user