DROP DATABASE "railway" returns cannot drop currently open database.

My goal is to rerun alembic migrations from scratch. How can I achieve that?
8 Replies
Percy
Percy8mo ago
Project ID: N/A
Brody
Brody8mo ago
I think that error should give you a good idea of what you need to do?
Martynas
Martynas8mo ago
Well there are 6 open sessions, so not exactly sure how to end those. Shutting down the server could be an option I guess, but I wonder if there is a more elegant option.
Brody
Brody8mo ago
from the error message, you can't have the railway database open while trying to drop it, that's just how it works
Martynas
Martynas8mo ago
Sure, but the backend server still keeps the connection to the database
Brody
Brody8mo ago
they need to be closed, as the error message states
Martynas
Martynas8mo ago
Okay, can I temporrarily shut down the server on railway? Couldnt find a way
Brody
Brody8mo ago
you can remove the active deployment from its 3 dot menu