Skip to content

Commit 38c0466

Browse files
committed
Add migrations to fix errors by not creating tables
1 parent c350e90 commit 38c0466

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
@@ -5,12 +5,14 @@
55
import math
66
from typing import Union
77
from flask import Flask, render_template, redirect, url_for, request
8+
from flask_migrate import Migrate, migrate
89
from flask_sqlalchemy import SQLAlchemy
910
from werkzeug.wrappers import Response
1011

1112
app = Flask(__name__)
1213
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///users.db"
1314
db = SQLAlchemy(app)
15+
migrate = Migrate(app, db)
1416

1517

1618
class User(db.Model): # user class

0 commit comments

Comments
 (0)