basalt / prisma/src / MigrateTenantsOptions
Interface: MigrateTenantsOptions
Defined in: prisma/src/migrate.ts:47
Properties
concurrency?
> optional concurrency?: number
Defined in: prisma/src/migrate.ts:53
Max tenants migrated in parallel. Default: 5.
migrate?
> optional migrate?: MigrateFn
Defined in: prisma/src/migrate.ts:51
Runs the migration for one tenant. Default: prismaMigrator().
onResult?
> optional onResult?: (result) => void
Defined in: prisma/src/migrate.ts:55
Called as each tenant finishes (for progress output).
Parameters
result
Returns
void
target
> target: MigrateTarget
Defined in: prisma/src/migrate.ts:49
tenants
> tenants: string[]
Defined in: prisma/src/migrate.ts:48
verifyTables?
> optional verifyTables?: boolean
Defined in: prisma/src/migrate.ts:69
After migrating, check that the tenant's schema actually has tables, and report ok: false when it does not. Default: true.
This exists because a successful exit code is not evidence that anything was applied: prisma migrate deploy exits 0 when it finds no migrations, leaving a schema that holds _prisma_migrations and nothing else. Without the check that tenant is marked ready, and the damage only surfaces later, as a query against a table that was never created.
Only runs in schema mode, and only when provision can also read (a PrismaClient can). Set to false if a tenant legitimately starts empty.