interdrifter
interdrifter
Explore posts from servers
DTDrizzle Team
Created by interdrifter on 7/2/2023 in #help
How to properly do foreign keys in schema with PlanetScale?
I'm aware that foreign key constrains aren't supported, but foreign keys themselves are. push:
sqlMessage: 'VT10001: foreign key constraints are not allowed'
sqlMessage: 'VT10001: foreign key constraints are not allowed'
export const session = mysqlTable("auth_session", {
id: varchar("id", { length: 128 }).primaryKey(),
userId: varchar("user_id", { length: 15 }).notNull().references(() => user.id),
// ...
});
export const session = mysqlTable("auth_session", {
id: varchar("id", { length: 128 }).primaryKey(),
userId: varchar("user_id", { length: 15 }).notNull().references(() => user.id),
// ...
});
3 replies