TypeError: Cannot read properties of undefined (reading 'isRLSEnabled')

TypeError: Cannot read properties of undefined (reading 'isRLSEnabled') I am getting this error when using Drizzle kit push I am using Supabase. I recently updated the Drizzle Orm and Drizzle Kit and I was not getting this error before the update.
14 Replies
Júlio
JúlioOP2mo ago
Maybe is this. I will test
No description
Júlio
JúlioOP2mo ago
Adjusted to be an array, but it keeps the error
Olamide
Olamide2mo ago
Were you able to fix it I'm having the same error
farhan
farhan2mo ago
having the same error, @Andrew Sherman
Andrii Sherman
Andrii Sherman2mo ago
I would need your drizzle schema to reproduce
farhan
farhan2mo ago
previous schema is this
import { pgEnum, pgTable as table } from "drizzle-orm/pg-core";
import * as t from "drizzle-orm/pg-core";
import { createInsertSchema, createSelectSchema } from "drizzle-zod";

export const orders = table("orders", {
id: t.integer().primaryKey().generatedAlwaysAsIdentity(),
raw_body: t.json(),
raw_body_text: t.text(),
createdAt: t.timestamp().defaultNow(),
updatedAt: t.timestamp().defaultNow(),
});

export const selectOrdersSchema = createSelectSchema(orders);

export const insertOrdersSchema = createInsertSchema(orders)
.required({
raw_body: true,
raw_body_text: true,
})
.omit({
id: true,
createdAt: true,
updatedAt: true,
});
import { pgEnum, pgTable as table } from "drizzle-orm/pg-core";
import * as t from "drizzle-orm/pg-core";
import { createInsertSchema, createSelectSchema } from "drizzle-zod";

export const orders = table("orders", {
id: t.integer().primaryKey().generatedAlwaysAsIdentity(),
raw_body: t.json(),
raw_body_text: t.text(),
createdAt: t.timestamp().defaultNow(),
updatedAt: t.timestamp().defaultNow(),
});

export const selectOrdersSchema = createSelectSchema(orders);

export const insertOrdersSchema = createInsertSchema(orders)
.required({
raw_body: true,
raw_body_text: true,
})
.omit({
id: true,
createdAt: true,
updatedAt: true,
});
after update the schema and has a lot of changes on orders table, then it became a problem
Andrii Sherman
Andrii Sherman2mo ago
what version of drizzle-kit and drizzle-orm do you have?
farhan
farhan2mo ago
"drizzle-orm": "^0.36.0", "drizzle-kit": "^0.27.1" im using rds postgres
Andrii Sherman
Andrii Sherman2mo ago
Thanks Checking it Do you see it in generate or push?
farhan
farhan2mo ago
i saw it during generate
Andrii Sherman
Andrii Sherman2mo ago
reproduced fixing and including in the patch release drizzle-kit@rls-fix here is a tag I'm testing on - working well
farhan
farhan2mo ago
nice tq so much @Andrew Sherman !
Bart
Bart2mo ago
thanks for the fix @Andrew Sherman, was having the same problem!
Want results from more Discord servers?
Add your server