mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-12-26 19:35:37 +00:00
8c8fa8ea99
* 💄 Format with black 24.x.x * 💄 Update black version to 24.x.x in pre-commit check
40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
"""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 ###
|