try to add a Migrate call so we can migrate I hope

This commit is contained in:
Maarten de Waard 2022-04-05 12:11:38 +02:00
parent 2564f3aae6
commit 3d70482029
No known key found for this signature in database
GPG key ID: 1D3E893A657CC8DA
3 changed files with 4 additions and 12 deletions

7
app.py
View file

@ -1,6 +1,7 @@
from flask import Flask, jsonify
from flask_jwt_extended import JWTManager
from flask_cors import CORS
from flask_jwt_extended import JWTManager
from flask_migrate import Migrate
from jsonschema.exceptions import ValidationError
from werkzeug.exceptions import BadRequest
from flask_sqlalchemy import SQLAlchemy
@ -46,9 +47,7 @@ app.config["SQLALCHEMY_DATABASE_URI"] = SQLALCHEMY_DATABASE_URI
#db = SQLAlchemy()
db.init_app(app)
# Late beceuse of circular import
##
Migrate(app, db)
app.logger.setLevel(logging.INFO)

View file

@ -24,8 +24,6 @@ import ory_kratos_client
# Flask
from flask import Flask, abort, redirect, render_template, request
from flask.cli import AppGroup
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from ory_kratos_client.api import v0alpha2_api as kratos_api
from areas import cli

View file

@ -1,7 +1,2 @@
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()