Skip to content

Function: rbacMigration() ​

ts
function rbacMigration(options?): RbacMigration;

Defined in: packages/kysely/src/schema.ts:236

A Kysely migration that creates (up) and drops (down) the rbac-evolution tables.

ts
const migrator = new Migrator({
  db,
  provider: { getMigrations: async () => ({ '0001_rbac': rbacMigration(), ...yourMigrations }) },
})

Parameters ​

ParameterType
options?RbacMigrationOptions

Returns ​

RbacMigration

Released under the MIT License. Inspired by spatie/laravel-permission.