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

Prevent running inline sql on some db connections (e.g production) #1045

Closed
julienR2 opened this issue Feb 8, 2024 · 2 comments
Closed

Prevent running inline sql on some db connections (e.g production) #1045

julienR2 opened this issue Feb 8, 2024 · 2 comments

Comments

@julienR2
Copy link

julienR2 commented Feb 8, 2024

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 ?

@cweijan
Copy link
Owner

cweijan commented Feb 9, 2024

Thanks for the feedback, I will try to support it in future versions.

@cweijan
Copy link
Owner

cweijan commented Jun 5, 2024

I misunderstood your issue before. You just need to change your production connection to readonly.
image
image

@cweijan cweijan closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants