Skip to content

basalt / prisma/src / PrismaMigratorOptions

Interface: PrismaMigratorOptions ​

Defined in: prisma/src/migrate.ts:141

Properties ​

configPath? ​

> optional configPath?: string

Defined in: prisma/src/migrate.ts:160

Path to a prisma.config.ts (--config). Use this when the tenant migrations live somewhere other than the central migrations directory.

schemaPath alone cannot express that: migrations.path is a property of the config, not of the schema, so Prisma keeps reading the central migration history even when --schema points at the tenant models. The result is a tenant database that gets _prisma_migrations and none of the tables. Point configPath at a config that pins both.

Two Prisma behaviours worth knowing, because neither is guessable: paths inside a config file resolve against that file's own directory, not the project root; and a loaded config makes Prisma skip its usual .env loading, so the config must read its URL from the environment (this migrator always sets DATABASE_URL for the tenant).


env? ​

> optional env?: Record<string, string>

Defined in: prisma/src/migrate.ts:162

Extra env for the child process.


schemaPath? ​

> optional schemaPath?: string

Defined in: prisma/src/migrate.ts:143

Path to schema.prisma, if not the default location.

Released under the MIT License.