Flo
Flo
Explore posts from servers
DTDrizzle Team
Created by Flo on 3/15/2025 in #help
Typesafe references?
Why does this not show any kind of error?
export const a = pgTable('a', {
id: uuid("id").primaryKey().defaultRandom()
});
export const b = pgTable('b', {
id: uuid("id").primaryKey().defaultRandom(),
aId: timestamp('a_id').references(() => a.id).notNull()
});
export const a = pgTable('a', {
id: uuid("id").primaryKey().defaultRandom()
});
export const b = pgTable('b', {
id: uuid("id").primaryKey().defaultRandom(),
aId: timestamp('a_id').references(() => a.id).notNull()
});
A timestamp referencing a UUID should not be possible... How do I get this to be typesafe, so references checks the field that is referenced to be the same type?
1 replies
DHDistant Horizons
Created by Flo on 10/20/2024 in #help-me
Why is it so blurry?
No description
4 replies