Closed ganeshmastud closed 4 years ago
Please edit configuration/connection/logging settings in 'C:\Users\mastud\PycharmProjects\FoodTracker\migrations\alembic.ini' before proceeding. this is issue
Sorry, but I don't understand. You have a call to create_all()
in your application. Why is that? That competes with Flask-Migrate. If you want to manage your database with Flask-Migrate then you can't create your tables by directly going to SQLAlchemy.
Also you seem to have deleted a migration file that was in use, so after that you are not going to have a valid migration repository. I'm not sure how to help you, it is unclear to me what you need to do.
an error has been solved by making creating a new virtual environment and adding these file in that venv of a new project, after 2day search I found the answer in StackOverflow that only one thing that I required is to add one line in env.py file in migrations folder is from models import User, Fooditem sir if you know what it means can you pls explain me
@ganeshmastud You appear to be copying things from stack overflow without understanding them. On the other side, I mentioned a couple of concrete problems with your code and you are ignoring it. I'm sorry but I can't really help. If you found a solution to your problem then great, if not, then you need to make an effort and explain the problem better, and when I ask you a question answer it.
Why I deleted the migrations file? is because whenever I tried to run migrate command it dops my table to overcome this issue I found some answer on StackOverflow then I added
in my models file
################################################################# alembic file
######################################################################### when tried to perform migrate
######################################################################### config file
###########################################################################