sensors is separate API with td

This commit is contained in:
2026-11-01 12:07:04 +01:00
parent b7048b401d
commit 85179c8a80
24 changed files with 1229 additions and 321 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ from sqlalchemy import engine_from_config, pool
# Add the project root to sys.path so that models can be imported.
sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__), "..")))
from app import create_app
from sensors_app import create_app
from models import db
# Create the Flask application to get the database URI.
@@ -1,4 +1,4 @@
"""add user table
"""deprecated user table (users moved to the main app)
Revision ID: c59e689377c2
Revises: 7f92bfc47dfc
@@ -7,9 +7,6 @@ Create Date: 2026-10-03 19:06:44.095699
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = 'c59e689377c2'
@@ -19,22 +16,12 @@ depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('user',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('username', sa.String(length=80), nullable=False),
sa.Column('password_hash', sa.String(length=255), nullable=False),
sa.Column('is_admin', sa.Boolean(), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('username')
)
# ### end Alembic commands ###
"""No-op: the sensors database no longer stores users.
The revision is kept so legacy databases that already point at it can
still be upgraded. New sensors databases create only sensor tables.
"""
def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('user')
# ### end Alembic commands ###
"""No-op: the user table is no longer part of the sensors database."""