migrations are running, but two _sqlx_migrations tables are being created, and sqlx migrate run doesn't recognize migration as having previously run
#3858
Unanswered
emptydiagram
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I cannot figure out what I'm doing wrong, any help would be appreciated. I have a postgres instance. I create a user and a database via
psql:in a different terminal window, I have configured my
DATABASE_URLenv variable correctly I think:I have two migrations already created in the
migrations/folder. I runsqlx migrate run:All seems well so far! I can verify the tables were created! But when i check the information, the migrations still show pending:
I also see that there are two
_sqlx_migrationstables: one under thepublicschema, and one under themyappschema. Thepublicone has the migration information, themyappone is empty:Also, when i run
migrate runagain it tries to re-run the migrations and throws an error:Why is this happening? What am I doing wrong? I have already tried a
cargo cleanand dropping themyappdatabase / schema / user.Beta Was this translation helpful? Give feedback.
All reactions