add pereodic func

This commit is contained in:
2024-05-31 22:12:59 +03:00
parent 85d6145df2
commit c4def899c7
6 changed files with 180 additions and 2 deletions

1
migrations/README Normal file
View File

@@ -0,0 +1 @@
Single-database configuration for Flask.

View File

@@ -0,0 +1,46 @@
"""empty message
Revision ID: b52c8dd65906
Revises:
Create Date: 2024-05-31 11:30:48.526961
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b52c8dd65906'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('averageperday',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('temp1', sa.Float(), nullable=False),
sa.Column('vlaz1', sa.Float(), nullable=False),
sa.Column('temp2', sa.Float(), nullable=False),
sa.Column('vlaz2', sa.Float(), nullable=False),
sa.Column('addTime', sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('averageperhour',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('temp1', sa.Float(), nullable=False),
sa.Column('vlaz1', sa.Float(), nullable=False),
sa.Column('temp2', sa.Float(), nullable=False),
sa.Column('vlaz2', sa.Float(), nullable=False),
sa.Column('addTime', sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('averageperhour')
op.drop_table('averageperday')
# ### end Alembic commands ###