ariga / atlas

Manage your database schema as code
https://atlasgo.io
Apache License 2.0
6k stars 267 forks source link

atlas.hcl: enforce authenticated (atlas login) usage for CLI commands #3214

Open torchsec-roni opened 2 weeks ago

torchsec-roni commented 2 weeks ago

Hey, we recently encountered the following error when trying to run atlas migrate diff:

➜  atlas migrate --env local diff
Error: drop enum type "my_favorite_enum": pq: cannot drop type my_favorite_enum because other objects depend on it

This was resolved by running:

➜  atlas login

The error message was very confusing.

a8m commented 2 weeks ago

Hey! Thanks for the feedback, @torchsec-roni.

That's because when you're not logged in, some database features will not be managed by Atlas. We'll add an option in the atlas.hcl file to enforce login. I'll keep this issue open so you can track the progress of it.

torchsec-roni commented 2 weeks ago

Sounds great! This will be very helpful for our team.