- #1
rgtr
- 92
- 8
- TL;DR Summary
- I am trying to use alembic in flask. I am following Miguel Grinberg's tutorial but I am getting an error. More details below
https://blog.miguelgrinberg.com/post/how-to-add-flask-migrate-to-an-existing-project
I am using Visual Studio Code and have a database file already created called test.db. My environment variables for test.db name is SQLALCHEMY_DATABASE_URI and the value is sqlite:///test.db In the actual code to the access the environment variable I use SQLALCHEMY_DATABASE_URI = os.environ['SQLALCHEMY_DATABASE_URI']
This website is only running on my local machine if that makes a difference. When I type
pip install flask-migrate flask db migrate.
Here is the current error
The link below shows the previous error. The odd part is that the error below was showing up I already have Flask-Login installed. I also got a similar error with Flask-Mail and Flask-WTF but I already pip installed them and the code was working. So IOW I had to pip install some things twice even though the code was working to avoid errors while running in the terminal pip install flask-migrate and flask db migrate.
Also does my current database have to be up to date?How do I fix this?
Just one thing I need to add I am using a setup similar to this.
https://github.com/CoreyMSchafer/code_snippets/tree/master/Python/Flask_Blog/11-Blueprints
Thanks
I am using Visual Studio Code and have a database file already created called test.db. My environment variables for test.db name is SQLALCHEMY_DATABASE_URI and the value is sqlite:///test.db In the actual code to the access the environment variable I use SQLALCHEMY_DATABASE_URI = os.environ['SQLALCHEMY_DATABASE_URI']
This website is only running on my local machine if that makes a difference. When I type
pip install flask-migrate flask db migrate.
Here is the current error
The link below shows the previous error. The odd part is that the error below was showing up I already have Flask-Login installed. I also got a similar error with Flask-Mail and Flask-WTF but I already pip installed them and the code was working. So IOW I had to pip install some things twice even though the code was working to avoid errors while running in the terminal pip install flask-migrate and flask db migrate.
Also does my current database have to be up to date?How do I fix this?
Just one thing I need to add I am using a setup similar to this.
https://github.com/CoreyMSchafer/code_snippets/tree/master/Python/Flask_Blog/11-Blueprints
Thanks