Handle error `ERROR HY000 (1105): direct DDL is disabled`
See original GitHub issuePlanetScale or Vitess (with enable_direct_ddl=false
) throws the following error if you try to run DDL statements on the main
branch, as you are supposed to only run these in branches and deploy them via “deploy requests”:
ERROR HY000 (1105): direct DDL is disabled
To reproduce: Run any DDL statement on a main
branch on a PlanetScale database.
We should catch this and output a known error message with the following message text:
Direct execution of DDL (Data Definition Language) SQL statements is disabled on this database. Please read more here how to handle this: https://pris.ly/d/migrate-no-direct-ddl
(The link currently points to a rather general issue, but will be updated to point to a specific issue or documentation later)
The Vitess instances we are testing against do not show this behavior by default, but can be configured to do so via ENABLE_DIRECT_DDL: false
in docker-compose.yml
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Branching
You'll see a ERROR 1105 (HY000): direct DDL is disabled message if you attempt to make schema changes in a production branch.
Read more >python - Why do I get this error when I want to connect ...
Why do I get this error when I want to connect to my database pymysql.err.OperationalError: (1105, 'direct DDL is disabled').
Read more >Chapter 2, Server Error Message Reference
Error number: 1105 ; Symbol: ER_UNKNOWN_ERROR ; SQLSTATE: HY000 ... Message: The '%s' feature is disabled; you need MySQL built with '%s' to...
Read more >Troubleshooting for RDS Proxy
To fix this error, do one of the following: Disable the proxy's Require Transport Layer Security option. Connect to the database using the...
Read more >Error message reference
For more information about how to work with exceptions and error codes, see Handling exceptions and errors. Prisma Client error types.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bigint I think this is probably because you are pushing to the main branch. Pushing to any other branch should work. We haven’t implemented special handling for this error yet.
That depends on how you want to use PlanetScale. You can either do that, but I am not sure if branches get the same guarantees re stability as the main branch. Or you use their branching system and merge the PR changes from the branch where you applied the migration, to your main branch (instead of using
migrate deploy
as you would in the normal Prisma only workflow).