How to manage when your dependency has a migration, but so does your own app, without having multiple databases #3482
Unanswered
matthiasdebernardini
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So I am buliding an axum webserver, I have my own sql scripts for my own app data. However, I am also using
tower-sessions-sqlx
crate which stores my users as they log in and clears them out after some time.Thing is, when I run that app, it has its own migration scripts and write its own migration version into my database.
I will now bring in another app, that has its own sqlx migration scripts (to keep its own state).
How do I manage all these different migrations? I can just make a separate database for each of them, but I should be able to have all these crates share one instance of postgres, since they dont have any overlap in terms of the tables they are storing.
Also how should crate authors write their migrations? Seems like they should have a way to namespace them or something like that. Any tips?
Beta Was this translation helpful? Give feedback.
All reactions