Skip to content

Commit ae60d0a

Browse files
author
App Generator
committed
Phase 4 - Integrate Flask-Migrate
1 parent a2fa2e1 commit ae60d0a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# Import Flask
1010
from flask import Flask
1111
from flask_sqlalchemy import SQLAlchemy
12+
from flask_migrate import Migrate
1213

1314
# Inject Flask magic
1415
app = Flask(__name__)
@@ -19,5 +20,8 @@
1920
# Construct the DB Object (SQLAlchemy interface)
2021
db = SQLAlchemy (app)
2122

23+
# Enabel migration for our application
24+
Migrate(app, db)
25+
2226
# Import routing to render the pages
2327
from app import views, models

0 commit comments

Comments
 (0)