Closed NLanese closed 8 months ago
Hi @NLanese,
Could you double check that the DATABASE_URL is pointing towards your new development branch?
The reason I ask:
Error: direct DDL is disabled
Should only be returned by a production branch. Makes me think Prisma here isn't connected to the correct branch.
You could also go to the main branch page in the UI and disable safe migrations for your production branch.
If neither of these work, please let me know your org + database name and I'll take a look.
Note the parallel discussion about this problem in the Prisma repo: https://github.com/prisma/prisma/discussions/22588
@mscoutermarsh I believe that was it! I did not realize different branches had different DATABSE_URLs! Now, I have pscale auth login
to my account which has access to the Org which holds the database and its production and development branches. I am now getting an 'incorrect credentials' error when I run prisma db push
How do I switch to be the user displayed in the 'Connect' section of this database, with username lkte0xromomngn1cab9l
?
prisma always uses whatever is set to DATABASE_URL
in your environment. Are you updating your environment variable to match the correct connection string for the branch you want?
The pscale
CLI does not do this for you. Unless you do something like this, pscale connect mydb mybranch --execute "prisma db push"
.
This command pscale connect
, establishes a connection to the branch then exposes sets a DATABASE_URL
. Once it is set, the --execute
flag runs the prisma command.
I made very slight changes to my prisma.schema which begins with the following information...
This db was made in 2021, using ONLY prisma generate and prisma migrate. However, both of those options are now failing as well, with the following error message
So I went back to PlanetScale and Prisma documentation. Both of which were really no help at all. The best I got was this off PlanetScales Prisma documentation... "Tip You'll see a ERROR 1105 (HY000): direct DDL is disabled message if you attempt to make schema changes in a production branch with safe migrations enabled. Instead, create a development branch, and make your changes there."
Expect that does me absolutely no good because I created a development branch and I'm still getting the exact same errors. So whenever I run prisma db push I get this...
I am at my wits end trying to solve this, please assist!