Files
ProjectIOT/migrations/versions/ac8b1871be3d_.py
2025-04-23 00:22:11 +02:00

41 lines
1.1 KiB
Python

"""empty message
Revision ID: ac8b1871be3d
Revises:
Create Date: 2025-04-22 22:32:26.012696
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ac8b1871be3d'
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 ###