Function: rbacMigration()
ts
function rbacMigration(options?): new () => RbacTypeormMigration;Defined in: packages/typeorm/src/index.ts:103
A TypeORM migration class that creates the five rbac tables (and their indexes), like createRbacTables of the Kysely package. Add it to the DataSource's migrations and run typeorm migration:run.
ts
new DataSource({ ..., migrations: [rbacMigration(), ...yourMigrations] })Parameters
| Parameter | Type |
|---|---|
options? | RbacTypeormMigrationOptions & Pick<RbacMigrationOptions, "expiry"> |
Returns
new () => RbacTypeormMigration
