Replies: 3 comments 1 reply
-
I'm running into this too sometimes. Some things I've tried with different levels of success:
|
Beta Was this translation helpful? Give feedback.
-
I faced to same problem with 'postgres' and 'sqlx' and I managed to fix it by removing database and creating i again. (Warning: you will lost you data) simply by login as root: sudo -u postgres psql postgres and running: DROP database db;
CREATE database db; And I also did add this to my makefile: pg-reset-db:
sudo -u postgres psql postgres -c "DROP database db;"
sudo -u postgres psql postgres -c "CREATE database db;" so I can do it with one command: make pg-reset-db And yes! I know its been a long time🙂. but I faced this error and end up here. so I guess here is a good place to share my exp. |
Beta Was this translation helpful? Give feedback.
-
ive found it's the sqlx_migrations hidden table that is causing the issue. open pgadmin and delete that table and ur good to go. |
Beta Was this translation helpful? Give feedback.
-
Our project has a
cargo make
target that cycles the database (drops and recreates the database, then reruns migrations). Usually after running this targetcargo make run
works fine, but sometimes it fails withand it requires cleaning and rebuilding the project to resolve, which takes about 5 minutes so we avoid it when possible.
Any idea why that could be happening? I can't consistently reproduce this behavior.
Beta Was this translation helpful? Give feedback.
All reactions