N
Neon5mo ago
foreign-sapphire

Avoid using main

There is something I'm super worried about: When I log in to the Neon console and create a new branch to test out some schema changes, it seems very, very easy to make those schema changes to the main branch. Is there any way of avoiding this?
6 Replies
adverse-sapphire
adverse-sapphire5mo ago
Hi @Martin Carlsson How are you applying the schema changes? Via the Neon SQL Editor in the console? On paid plans, there is a protected branches feature. When enabled, you'll get a warning in the SQL Editor when you're on a protected branch. https://neon.tech/docs/guides/protected-branches https://neon.tech/docs/changelog/2025-04-04#new-safeguards-for-protected-branches If current protections that we offer are not enough, let me know what you think would work for your use case/workflow.
foreign-sapphire
foreign-sapphireOP5mo ago
Hey @Daniel Thank you! That’s exactly what I was looking for. 🤩🙏 I just upgraded and have now got the warning. Personally, though, I would like the warning to be stronger - and not just be dismissed with a single click.
adverse-sapphire
adverse-sapphire4mo ago
Thank you for the feedback on the warning. I'll share it with the owning team and see if we can make it a bit stronger.
foreign-sapphire
foreign-sapphireOP4mo ago
🙏 Under all circumstances, the protected branch is a cool feature. Maybe a red border around SQL Editor, or a different color nav bar.
adverse-sapphire
adverse-sapphire4mo ago
Good ideas. Thank you
automatic-azure
automatic-azure4mo ago
Hey @Martin Carlsson ! 🙂 I'm the developer working on improving the protected branches story (together with @Daniel and @Lacho ). Thanks a lot for the feedback, we're planning to add a few extra barriers (beyond just visual cues) for certain (destructive) actions to the protected branches. So insights on your usage are super helpful, if you have anything more direct in mind (e.g.: actions you usually perform on the SQL Editor and actions you'd be expecting to be prevented by protecting the branch) it's ok if you don't - but if you do, I want to make sure we consider it

Did you find this page helpful?