Skip to content

Commit cd9a4b0

Browse files
committed
Add migrations to fix error not creating tables
1 parent 3eedbc8 commit cd9a4b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55
from typing import Union
66
from flask import Flask, flash, render_template, request, redirect, url_for
7+
from flask_migrate import Migrate, migrate
78
from flask_sqlalchemy import SQLAlchemy
89
from sqlalchemy import text
910
from sqlalchemy.orm.relationships import RelationshipProperty
@@ -15,6 +16,7 @@
1516
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
1617
app.secret_key = os.environ["SECRET_KEY"]
1718
db = SQLAlchemy(app)
19+
migrate = Migrate(app, db)
1820

1921

2022
class User(db.Model):

0 commit comments

Comments
 (0)