kysely-org / kysely-ctl

Command-line tool for Kysely
MIT License
65 stars 2 forks source link

Potential incompatibility with a supabase hosted project #66

Closed thenbe closed 2 months ago

thenbe commented 2 months ago

Hi. First, thanks for creating kysely, the type inference has been awesome!


There's this issue I've been facing when using both of these at the same time:

The issue only happens when those two are used together. In isolation, the issue does not happen. In other words:

One crucial thing I should point out is that supabase hosted projects do not grant superuser privileges. Would you happen to know if that could be a cause of incompatibility between the two? Could it be possible that kysely tries to alter some default permissions or entities managed by Supabase?

igalklebanov commented 2 months ago

Hey 👋

What dialect are you using?

thenbe commented 2 months ago

pg

igalklebanov commented 2 months ago

The core PostgreSQL dialect executes the following:

select pg_advisory_xact_lock($1)

https://github.com/kysely-org/kysely/blob/master/src/dialect/postgres/postgres-adapter.ts#L23

...and runs migrations within a transaction.

Closing as this seems not related to this project, but to Kysely itself.