vscode-database-client
vscode-database-client copied to clipboard
Prevent running inline sql on some db connections (e.g production)
I love to be able to run inline sql directly! It's super practical to write migration, and quickly test sql queries.
However, since it automatically run them into the open connection, it's a bit dangerous, when you have a prod database open 😅 Of course, we shouldn't have open write connection to production base, or have any other security net (backup, and so on), but the reality of each projects, it that you often end up adjusting slightly a value here or there in a prod DB. Then you have it opened, and if you forget about it, (or miss-click while working on an sql file), you might end up running an SQL query into your open prod db..
An easy way to workaround this issue would be to disable running inline sql script on some connection (I'd then disabled the option on my prod connection, making sure no inline sql request will be ran by mistake)
What do you think ?
Thanks for the feedback, I will try to support it in future versions.
I misunderstood your issue before. You just need to change your production connection to readonly.