Skip to content

issue with migrations using postgres + schemas with limited access #1537

@xileftenurb

Description

@xileftenurb

Hi there, so I found out some issues with Kysely,

For context, I'm using kysely 0.28.4 with postgres driver,

The database is set up to have multiple schemas, each with its independent user.
Each schema has its migration tables and is an independent entity in nearly all aspects,

When I try to migrate (using kysely-ctl), the migration fails because kysely is trying to call "getTable" here ->
https://github.com/kysely-org/kysely/blob/master/src/migration/migrator.ts#L464

But this query fails because the user performing the migration does not have access to all schemas, only their own.

My workaround for now is to give each user access to all schemas, but I think it should not be necessary, if Kysely would only check the table for the current schema instead of getting all tables and then checking for the schema

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions