Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative DATABASE_URL not resolved according to prismaSchemaFolder #1273

Open
katywings opened this issue Sep 8, 2024 · 0 comments
Open
Labels
kind/bug A reported bug.

Comments

@katywings
Copy link

Bug description

Prisma Studio still uses the old DATABASE_URL resolution logic and resolves DATABASE_URL relative to the prisma folder instead of the schema file. Because of the new prismaSchemaFolder feature, prisma/prisma#24609 changed the DATABASE_URL resolution to be based on the location of the schema file.

How to reproduce

  1. Choose the sqlite provider
  2. Enable the prismaSchemaFolder preview feature and move the main schema file to projectRoot/prisma/schema/main.schema
  3. Use a relative DATABASE_URL such as DATABASE_URL=file:../../.data/dev.db
  4. Run db migrations - it will correctly create dev.db under projectRoot/.data/dev.db
  5. Run prisma studio - it will try to open the db under projectRoot/../.data/dev.db

Expected behavior

Prisma Studio should use the same DATABASE_URL resolution logic as Prisma.

Prisma information

5.19.1

Environment & setup

  • OS: Linux
  • Browser: Firefox
  • Database: sqlite

Prisma logs

No response

@katywings katywings added the kind/bug A reported bug. label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

1 participant