From c828fd94e4d45b97a4942f1435efc6bb5aab2dd1 Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Sat, 31 Aug 2024 23:04:49 +0800 Subject: [PATCH] =?UTF-8?q?:recycle:=20cookie=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E4=B8=8E=20user=20=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/bdec8925b540_add_cookie.py | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 nonebot_bison/config/migrations/bdec8925b540_add_cookie.py diff --git a/nonebot_bison/config/migrations/bdec8925b540_add_cookie.py b/nonebot_bison/config/migrations/bdec8925b540_add_cookie.py deleted file mode 100644 index ac650f3..0000000 --- a/nonebot_bison/config/migrations/bdec8925b540_add_cookie.py +++ /dev/null @@ -1,63 +0,0 @@ -"""empty message - -Revision ID: bdec8925b540 -Revises: f9baef347cc8 -Create Date: 2024-08-22 20:53:08.850051 - -""" - -import sqlalchemy as sa -from alembic import op -from sqlalchemy import Text -from sqlalchemy.dialects import postgresql - -# revision identifiers, used by Alembic. -revision = "bdec8925b540" -down_revision = "f9baef347cc8" -branch_labels = None -depends_on = None - - -def upgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - op.create_table( - "nonebot_bison_cookie", - sa.Column("id", sa.Integer(), nullable=False), - sa.Column("user_id", sa.Integer(), nullable=False), - sa.Column("platform_name", sa.String(length=20), nullable=False), - sa.Column("content", sa.String(length=1024), nullable=False), - sa.Column("last_usage", sa.DateTime(), nullable=False), - sa.Column("status", sa.String(length=20), nullable=False), - sa.Column("tags", sa.JSON().with_variant(postgresql.JSONB(astext_type=Text()), "postgresql"), nullable=False), - sa.ForeignKeyConstraint( - ["user_id"], ["nonebot_bison_user.id"], name=op.f("fk_nonebot_bison_cookie_user_id_nonebot_bison_user") - ), - sa.PrimaryKeyConstraint("id", name=op.f("pk_nonebot_bison_cookie")), - ) - op.create_table( - "nonebot_bison_cookietarget", - sa.Column("id", sa.Integer(), nullable=False), - sa.Column("target_id", sa.Integer(), nullable=False), - sa.Column("cookie_id", sa.Integer(), nullable=False), - sa.ForeignKeyConstraint( - ["cookie_id"], - ["nonebot_bison_cookie.id"], - name=op.f("fk_nonebot_bison_cookietarget_cookie_id_nonebot_bison_cookie"), - ondelete="CASCADE", - ), - sa.ForeignKeyConstraint( - ["target_id"], - ["nonebot_bison_target.id"], - name=op.f("fk_nonebot_bison_cookietarget_target_id_nonebot_bison_target"), - ondelete="CASCADE", - ), - sa.PrimaryKeyConstraint("id", name=op.f("pk_nonebot_bison_cookietarget")), - ) - # ### end Alembic commands ### - - -def downgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - op.drop_table("nonebot_bison_cookietarget") - op.drop_table("nonebot_bison_cookie") - # ### end Alembic commands ###