mirror of
https://github.com/StefBuwalda/dashboard_test.git
synced 2025-10-30 03:09:59 +00:00
Removed packages that aren't used and assed a script to generate db upgrade
This commit is contained in:
5
migrate.py
Normal file
5
migrate.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from app import app
|
||||
from flask_migrate import migrate
|
||||
|
||||
with app.app_context():
|
||||
migrate()
|
||||
15
models.py
15
models.py
@@ -3,10 +3,21 @@ from datetime import datetime, timezone
|
||||
|
||||
|
||||
class log(db.Model):
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
dateCreated = db.Column(db.DateTime, nullable=False)
|
||||
id: int = db.Column(db.Integer, primary_key=True)
|
||||
dateCreated: datetime = db.Column(db.DateTime, nullable=False)
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
self.dateCreated = datetime.now(timezone.utc)
|
||||
|
||||
|
||||
class service(db.Model):
|
||||
id: int = db.Column(db.Integer, primary_key=True) # TODO: Switch to UUID
|
||||
url: str = db.Column(db.String, nullable=False)
|
||||
label: str = db.Column(db.String(15), nullable=False)
|
||||
public_access: bool = db.Column(db.Boolean, nullable=False)
|
||||
ping_method: int = db.Column(db.Integer, nullable=False)
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
@@ -2,10 +2,8 @@ aiohappyeyeballs==2.6.1
|
||||
aiohttp==3.12.15
|
||||
aiosignal==1.4.0
|
||||
alembic==1.16.5
|
||||
anyio==4.10.0
|
||||
attrs==25.3.0
|
||||
blinker==1.9.0
|
||||
certifi==2025.8.3
|
||||
click==8.2.1
|
||||
colorama==0.4.6
|
||||
Flask==3.1.2
|
||||
@@ -13,8 +11,6 @@ Flask-Migrate==4.1.0
|
||||
Flask-SQLAlchemy==3.1.1
|
||||
frozenlist==1.7.0
|
||||
greenlet==3.2.4
|
||||
h11==0.16.0
|
||||
httpcore==1.0.9
|
||||
idna==3.10
|
||||
itsdangerous==2.2.0
|
||||
Jinja2==3.1.6
|
||||
@@ -22,7 +18,6 @@ Mako==1.3.10
|
||||
MarkupSafe==3.0.2
|
||||
multidict==6.6.4
|
||||
propcache==0.3.2
|
||||
sniffio==1.3.1
|
||||
SQLAlchemy==2.0.43
|
||||
typing_extensions==4.15.0
|
||||
Werkzeug==3.1.3
|
||||
|
||||
Reference in New Issue
Block a user