"""add events

Revision ID: 02338256c6aa
Revises: 108677b68119
Create Date: 2022-06-01 03:17:51.063172+00:00

"""
import sqlalchemy as sa
import sqlmodel
from alembic import op

from common.database.tables.types import TimeStamp

# revision identifiers, used by Alembic.
revision = "02338256c6aa"
down_revision = "108677b68119"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "events",
        sa.Column(
            "valid_from",
            TimeStamp(timezone=True),
            nullable=False,
        ),
        sa.Column(
            "valid_until",
            TimeStamp(timezone=True),
            nullable=False,
        ),
        sa.Column("name", sqlmodel.sql.sqltypes.AutoString(), nullable=False),
        sa.Column("code", sqlmodel.sql.sqltypes.AutoString(), nullable=False),
        sa.Column("enabled", sa.Boolean(), nullable=False),
        sa.Column("id", sa.Integer(), nullable=False),
        sa.PrimaryKeyConstraint("id"),
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("events")
    # ### end Alembic commands ###

sqlmodel.sql.sqltypes.AutoString sqlalchemy.Integer common.database.tables.types.TimeStamp alembic.op.drop_table sqlalchemy.PrimaryKeyConstraint sqlalchemy.Boolean
[((1176, 1199), 'alembic.op.drop_table', 'op.drop_table', (['"""events"""'], {}), "('events')\n", (1189, 1199), False, 'from alembic import op\n'), ((1015, 1044), 'sqlalchemy.PrimaryKeyConstraint', 'sa.PrimaryKeyConstraint', (['"""id"""'], {}), "('id')\n", (1038, 1044), True, 'import sqlalchemy as sa\n'), ((546, 570), 'common.database.tables.types.TimeStamp', 'TimeStamp', ([], {'timezone': '(True)'}), '(timezone=True)\n', (555, 570), False, 'from common.database.tables.types import TimeStamp\n'), ((669, 693), 'common.database.tables.types.TimeStamp', 'TimeStamp', ([], {'timezone': '(True)'}), '(timezone=True)\n', (678, 693), False, 'from common.database.tables.types import TimeStamp\n'), ((760, 794), 'sqlmodel.sql.sqltypes.AutoString', 'sqlmodel.sql.sqltypes.AutoString', ([], {}), '()\n', (792, 794), False, 'import sqlmodel\n'), ((839, 873), 'sqlmodel.sql.sqltypes.AutoString', 'sqlmodel.sql.sqltypes.AutoString', ([], {}), '()\n', (871, 873), False, 'import sqlmodel\n'), ((921, 933), 'sqlalchemy.Boolean', 'sa.Boolean', ([], {}), '()\n', (931, 933), True, 'import sqlalchemy as sa\n'), ((976, 988), 'sqlalchemy.Integer', 'sa.Integer', ([], {}), '()\n', (986, 988), True, 'import sqlalchemy as sa\n')]