You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried a "make database._migrate" but I got an error because flask_script is not supported any more, I switched to Flask CLI
And my manage.py is as follow.
from flask import Flask
from flask.cli import FlaskGroup
from flask_migrate import Migrate
import config
from models import db
server = Flask(__name__)
server.debug = config.DEBUG
server.config["SQLALCHEMY_DATABASE_URI"] = config.DB_URI
db.init_app(server)
migrate = Migrate()
migrate.init_app(server, db)
#migrate = Migrate(server, db)
cli = FlaskGroup(server)
if __name__ == "__main__":
cli()
How ever when I run : make database._migrate which is ( docker-compose run --rm server python src/manage.py db migrate )
I get
Error: Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a 'wsgi.py' or 'app.py' file in the current directory. make: *** [database.migrate] Error 2
Could help with that please ?
The text was updated successfully, but these errors were encountered:
I tried a "make database._migrate" but I got an error because flask_script is not supported any more, I switched to Flask CLI
And my manage.py is as follow.
How ever when I run : make database._migrate which is ( docker-compose run --rm server python src/manage.py db migrate )
I get
Error: Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a 'wsgi.py' or 'app.py' file in the current directory. make: *** [database.migrate] Error 2
Could help with that please ?
The text was updated successfully, but these errors were encountered: