MibooGram/alembic/versions/a1c10da5704b_devices.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.1 KiB
Python
Raw Normal View History

2023-06-19 03:41:22 +00:00
"""devices
Revision ID: a1c10da5704b
Revises: ddcfba3c7d5c
Create Date: 2023-06-13 19:34:47.189846
"""
from alembic import op
import sqlalchemy as sa
import sqlmodel
# revision identifiers, used by Alembic.
revision = "a1c10da5704b"
down_revision = "ddcfba3c7d5c"
branch_labels = None
depends_on = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"devices",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("account_id", sa.BigInteger(), nullable=True),
sa.Column("device_id", sqlmodel.AutoString(), nullable=False),
sa.Column("device_fp", sqlmodel.AutoString(), nullable=False),
sa.Column("device_name", sqlmodel.AutoString(), nullable=True),
sa.PrimaryKeyConstraint("id"),
mysql_charset="utf8mb4",
mysql_collate="utf8mb4_general_ci",
)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table("devices")
# ### end Alembic commands ###