[Solved] sqlalchemy create tables [closed]


Short answer is db.create_all(). Here is a piece of this answer

app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql+psycopg2://login:pass@localhost/flask_app'
db = SQLAlchemy(app)
db.create_all()
db.session.commit()

solved sqlalchemy create tables [closed]