P
Prisma3mo ago
Kat

Is there any way to make Prisma ignore being inside docker?

I am in a docker container, and no matter how I connect, via code's terminal in a dev container, or a exec -it /bin/bash when I use prisma migrate dev --name UsernameToName I get the error : Error: Prisma Migrate has detected that the environment is non-interactive, which is not supported. This is making it impossible to make migrations, as my whole dev enviroment is inside adev container
3 Replies
Prisma AI Help
Prisma AI Help3mo ago
You chose to debug with a human. They'll tinker with your query soon. If you get curious meanwhile, hop into #ask-ai for a quick spin!
Kat
KatOP2mo ago
I do yes ... it suddenly started working, so I now feel dumb And it is doing it again as SOON as it needs to ask a question:
b38c7834168b:/workspaces/viridian/apps/backend# npx prisma migrate dev --name MoveUniqueField
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "app", schema "public" at "db:5432"


:warning: Warnings for the current datasource:

• A unique constraint covering the columns `[name]` on the table `Character` will be added. If there are existing duplicate values, this will fail.

Error: Prisma Migrate has detected that the environment is non-interactive, which is not supported.

`prisma migrate dev` is an interactive command designed to create new migrations and evolve the database in development.
To apply existing migrations in deployments, use prisma migrate deploy.
See https://www.prisma.io/docs/reference/api-reference/command-reference#migrate-deploy
b38c7834168b:/workspaces/viridian/apps/backend# npx prisma migrate dev --name MoveUniqueField
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "app", schema "public" at "db:5432"


:warning: Warnings for the current datasource:

• A unique constraint covering the columns `[name]` on the table `Character` will be added. If there are existing duplicate values, this will fail.

Error: Prisma Migrate has detected that the environment is non-interactive, which is not supported.

`prisma migrate dev` is an interactive command designed to create new migrations and evolve the database in development.
To apply existing migrations in deployments, use prisma migrate deploy.
See https://www.prisma.io/docs/reference/api-reference/command-reference#migrate-deploy
FOUND IT! env -u CI -u GITHUB_ACTIONS -u CODESPACES prisma migrate dev --name MoveUniqueField worked so checking all env vars, something set the env var CI - true

Did you find this page helpful?