Drizzle Studio Showing NaN for primary key

I'm seeing NaN for primary key (id) in Drizzle studio although it's uuid and when I actually call SQL, I see the correct uuid ID. Is this a bug? foreignKey (hirespaceId) seems just fine. Schema:
export const evaluationTable = pgTable("evaluation", {
id: uuid("id").primaryKey().defaultRandom(),
userId: text("user_id").references(() => userTable.id),
hirespaceId: uuid("hirespace_id")
.references(() => hirespaceTable.id)
.notNull(),
description: varchar("description", { length: 256 }).notNull(),
});
export const evaluationTable = pgTable("evaluation", {
id: uuid("id").primaryKey().defaultRandom(),
userId: text("user_id").references(() => userTable.id),
hirespaceId: uuid("hirespace_id")
.references(() => hirespaceTable.id)
.notNull(),
description: varchar("description", { length: 256 }).notNull(),
});
Dependencies:
"drizzle-orm": "^0.30.8",
"drizzle-kit": "^0.20.16",
"drizzle-orm": "^0.30.8",
"drizzle-kit": "^0.20.16",
Postgres Docker Image:
# Use postgres/example user/password credentials
version: "3.1"

services:
db:
image: postgres
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: testtest
POSTGRES_DB: dbdb
ports:
- 4321:4321
command: -p 4321
volumes:
pgdata:
# Use postgres/example user/password credentials
version: "3.1"

services:
db:
image: postgres
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: testtest
POSTGRES_DB: dbdb
ports:
- 4321:4321
command: -p 4321
volumes:
pgdata:
Image:
No description
5 Replies
Julian
JulianOP8mo ago
The last row, the actual value is 94a0efe8-1207-4ba0-ad7f-d71e106c6d98. So it seems like some sort of mistyping?
Andrii Sherman
Andrii Sherman8mo ago
@Julian should be fixed now! please check it
Julian
JulianOP8mo ago
Thank you!! Confirmed, it’s working! Can I close this then?
Julian
JulianOP8mo ago
GitHub
[BUG]: Drizzle Studio Postgres showing NaN for uuid primary key wit...
What version of drizzle-orm are you using? 0.30.8 What version of drizzle-kit are you using? 0.20.16 Describe the Bug Drizzle studio shows NaN for uuid primary key with Postgres. I ran raw SQL just...
Andrii Sherman
Andrii Sherman8mo ago
we will close it
Want results from more Discord servers?
Add your server