Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]:drizzle-kit pull returns .with({"securityInvoker":"on"}) #3585

Open
1 task done
johnstonisaac99 opened this issue Nov 21, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@johnstonisaac99
Copy link

johnstonisaac99 commented Nov 21, 2024

Report hasn't been filed before.

  • I have verified that the bug I'm about to report hasn't been filed before.

What version of drizzle-orm are you using?

0.36.3

What version of drizzle-kit are you using?

0.28.1

Other packages

No response

Describe the Bug

I have a pre-existing supabase database. I ran drizzle-kit pull which generated the drizzle folder including schema.ts

One of the schemas it generated looks like this

export const userInvites = pgView("user_invites", {	status: text(),
	schoolName: text("school_name"),
}).with({"securityInvoker":"on"}).as(sql`SELECT i.status, s.school_name FROM invites i JOIN schools s ON i.school_id = s.id WHERE i.email_address = get_user_email()`);

The error says:

Type 'string' is not assignable to type 'boolean | undefined'.ts(2322)
view.d.ts(15, 5): The expected type comes from property 'securityInvoker' which is declared here on type 'ViewWithConfig'

I believe it should be .with({"securityInvoker":true})

Is it okay for me to just change those to true in the schema.ts? Is this a bug or did I do something wrong? Thanks
I am using Supabase.

@johnstonisaac99 johnstonisaac99 added the bug Something isn't working label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant