K
Kysely13mo ago
djMax

create role in migration

Is it possible to create a role in a migration? And to do the grants and things as part of that?
1 Reply
Igal
Igal13mo ago
Hey 👋 There is no built-in support for such queries. You can execute raw SQL queries using the sql template tag:
import { sql } from 'kysely'

await sql`MY QUERY`.execute(db)
import { sql } from 'kysely'

await sql`MY QUERY`.execute(db)