Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

2.0.0-alpha22

Pre-release
Pre-release
Compare
Choose a tag to compare
@Errorname Errorname released this 23 Feb 19:55
· 62 commits to master since this release

Note: This version is compatible with [email protected]

Breaking changes

Prisma-multi-tenant now uses env variables instead of the schema.prisma file to store the provider & url of the management database. This makes prisma-multi-tenant less invasive and allow for a "default" value to be present in the .env file, so that you can still run prisma2 commands on this default datasource.

If you initialized your project with prisma-multi-tenant before this release here is what you must do:

Before:
schema.prisma

datasource tenant {
  provider = "sqlite"
  url      = env("PMT_URL")
}

datasource management {
  provider = "sqlite"
  url      = "file:management.db"
  enabled  = false
}

After:
schema.prisma

datasource db {
  provider = "sqlite"
  url      = env("DATABASE_URL")
}

.env

DATABASE_URL=file:dev.db

MANAGEMENT_PROVIDER=sqlite
MANAGEMENT_URL=file:management.db

Note: You may need to re-generate the migrations in the migrations folder


Improvements

  • Makes prisma-multi-tenant compatible with windows (#21 & #22)