mirror of
https://github.com/Fluffy-Bean/GameExpo23.git
synced 2025-06-18 22:43:12 +00:00
Add Flask Migrate and update run.sh
This commit is contained in:
parent
77c0711a24
commit
36be8993df
8 changed files with 37 additions and 30 deletions
|
@ -1,12 +1,13 @@
|
|||
from flask import Flask, render_template
|
||||
from flask_assets import Bundle
|
||||
from website.extensions import db, assets
|
||||
from website.config import INSTANCE_DIR
|
||||
from website.extensions import db, migrate, assets
|
||||
from website.config import INSTANCE_DIR, MIGRATION_DIR
|
||||
|
||||
app = Flask(__name__) # instance_path=INSTANCE_DIR
|
||||
app = Flask(__name__, instance_path=INSTANCE_DIR)
|
||||
app.config.from_pyfile('config.py')
|
||||
|
||||
db.init_app(app)
|
||||
migrate.init_app(app, db, directory=MIGRATION_DIR)
|
||||
with app.app_context():
|
||||
db.create_all()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue