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úlioOP3w ago
Maybe is this. I will test
No description
Júlio
JúlioOP3w ago
Adjusted to be an array, but it keeps the error
Olamide
Olamide3w ago
Were you able to fix it I'm having the same error
farhan
farhan3w ago
having the same error, @Andrew Sherman
Andrii Sherman
I would need your drizzle schema to reproduce
farhan
farhan3w 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
what version of drizzle-kit and drizzle-orm do you have?
farhan
farhan3w ago
"drizzle-orm": "^0.36.0", "drizzle-kit": "^0.27.1" im using rds postgres
Andrii Sherman
Thanks Checking it Do you see it in generate or push?
farhan
farhan2w ago
i saw it during generate
Andrii Sherman
reproduced fixing and including in the patch release drizzle-kit@rls-fix here is a tag I'm testing on - working well
farhan
farhan2w ago
nice tq so much @Andrew Sherman !
Bartastic
Bartastic2w ago
thanks for the fix @Andrew Sherman, was having the same problem!
Want results from more Discord servers?
Add your server