diff --git a/migrate.py b/migrate.py new file mode 100644 index 0000000..e177054 --- /dev/null +++ b/migrate.py @@ -0,0 +1,5 @@ +from app import app +from flask_migrate import migrate + +with app.app_context(): + migrate() diff --git a/models.py b/models.py index 0535df8..0883cb6 100644 --- a/models.py +++ b/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__() diff --git a/requirements.txt b/requirements.txt index 24f3f99..346c095 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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