mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-24 23:51:03 +00:00
Add Flask-Migrate
This commit is contained in:
parent
1398a9bb92
commit
24c9f44b25
3 changed files with 7 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -17,3 +17,6 @@ poetry.lock
|
||||||
|
|
||||||
# Nginx
|
# Nginx
|
||||||
advlabdb.conf
|
advlabdb.conf
|
||||||
|
|
||||||
|
# Flask-Migrate
|
||||||
|
migrations/
|
||||||
|
|
|
@ -5,6 +5,7 @@ from flask_admin import Admin
|
||||||
from flask_security import Security, SQLAlchemyUserDatastore
|
from flask_security import Security, SQLAlchemyUserDatastore
|
||||||
from flask_security.models import fsqla_v2 as fsqla
|
from flask_security.models import fsqla_v2 as fsqla
|
||||||
from flask_sqlalchemy import SQLAlchemy
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
|
from flask_migrate import Migrate
|
||||||
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
@ -39,6 +40,8 @@ db = SQLAlchemy(app)
|
||||||
|
|
||||||
fsqla.FsModels.set_db_info(db)
|
fsqla.FsModels.set_db_info(db)
|
||||||
|
|
||||||
|
migrate = Migrate(app, db)
|
||||||
|
|
||||||
from . import customClasses
|
from . import customClasses
|
||||||
|
|
||||||
adminSpace = Admin(
|
adminSpace = Admin(
|
||||||
|
|
|
@ -18,6 +18,7 @@ numpy = ">=1.22.3"
|
||||||
python-dotenv = ">=0.20.0"
|
python-dotenv = ">=0.20.0"
|
||||||
gunicorn = ">=20.1.0"
|
gunicorn = ">=20.1.0"
|
||||||
email-validator = ">=1.2.1"
|
email-validator = ">=1.2.1"
|
||||||
|
Flask-Migrate = ">=3.1.0"
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue