Files
ProjectIOT/migrations/versions/dcedd32468e2_.py
2025-04-24 18:17:26 +02:00

41 lines
1.1 KiB
Python

"""empty message
Revision ID: dcedd32468e2
Revises:
Create Date: 2025-04-23 09:48:54.655874
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'dcedd32468e2'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('AllowedPlates',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('plate', sa.String(length=40), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table('LoggedItems',
sa.Column('dateLogged', sa.DateTime(), nullable=False),
sa.Column('allowed', sa.Boolean(), server_default=sa.text('0'), nullable=False),
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('plate', sa.String(length=40), nullable=False),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('LoggedItems')
op.drop_table('AllowedPlates')
# ### end Alembic commands ###