mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-05-09 18:27:56 +08:00
👷 添加ruff actions
🐛 分支应该是main而不是master 💄 auto fix by pre-commit hooks 🔥 dependabot.yml的registrys需要token,先删除
This commit is contained in:
@@ -31,9 +31,7 @@ def upgrade():
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
)
|
||||
with op.batch_alter_table("target", schema=None) as batch_op:
|
||||
batch_op.add_column(
|
||||
sa.Column("default_schedule_weight", sa.Integer(), nullable=True)
|
||||
)
|
||||
batch_op.add_column(sa.Column("default_schedule_weight", sa.Integer(), nullable=True))
|
||||
batch_op.drop_column("last_schedule_time")
|
||||
|
||||
# ### end Alembic commands ###
|
||||
@@ -42,9 +40,7 @@ def upgrade():
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table("target", schema=None) as batch_op:
|
||||
batch_op.add_column(
|
||||
sa.Column("last_schedule_time", sa.DATETIME(), nullable=True)
|
||||
)
|
||||
batch_op.add_column(sa.Column("last_schedule_time", sa.DATETIME(), nullable=True))
|
||||
batch_op.drop_column("default_schedule_weight")
|
||||
|
||||
op.drop_table("schedule_time_weight")
|
||||
|
||||
@@ -18,9 +18,7 @@ depends_on = None
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table("target", schema=None) as batch_op:
|
||||
batch_op.add_column(
|
||||
sa.Column("last_schedule_time", sa.DateTime(timezone=True), nullable=True)
|
||||
)
|
||||
batch_op.add_column(sa.Column("last_schedule_time", sa.DateTime(timezone=True), nullable=True))
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ Create Date: 2023-03-20 01:14:42.623789
|
||||
"""
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
from sqlalchemy.ext.automap import automap_base
|
||||
from sqlalchemy.orm import Session
|
||||
from sqlalchemy.ext.automap import automap_base
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "a5466912fad0"
|
||||
|
||||
@@ -17,9 +17,7 @@ depends_on = None
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table(
|
||||
"nonebot_bison_scheduletimeweight", schema=None
|
||||
) as batch_op:
|
||||
with op.batch_alter_table("nonebot_bison_scheduletimeweight", schema=None) as batch_op:
|
||||
batch_op.alter_column("target_id", existing_type=sa.INTEGER(), nullable=False)
|
||||
batch_op.alter_column("start_time", existing_type=sa.TIME(), nullable=False)
|
||||
batch_op.alter_column("end_time", existing_type=sa.TIME(), nullable=False)
|
||||
@@ -30,9 +28,7 @@ def upgrade() -> None:
|
||||
batch_op.alter_column("user_id", existing_type=sa.INTEGER(), nullable=False)
|
||||
|
||||
with op.batch_alter_table("nonebot_bison_target", schema=None) as batch_op:
|
||||
batch_op.alter_column(
|
||||
"default_schedule_weight", existing_type=sa.INTEGER(), nullable=False
|
||||
)
|
||||
batch_op.alter_column("default_schedule_weight", existing_type=sa.INTEGER(), nullable=False)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
@@ -40,17 +36,13 @@ def upgrade() -> None:
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table("nonebot_bison_target", schema=None) as batch_op:
|
||||
batch_op.alter_column(
|
||||
"default_schedule_weight", existing_type=sa.INTEGER(), nullable=True
|
||||
)
|
||||
batch_op.alter_column("default_schedule_weight", existing_type=sa.INTEGER(), nullable=True)
|
||||
|
||||
with op.batch_alter_table("nonebot_bison_subscribe", schema=None) as batch_op:
|
||||
batch_op.alter_column("user_id", existing_type=sa.INTEGER(), nullable=True)
|
||||
batch_op.alter_column("target_id", existing_type=sa.INTEGER(), nullable=True)
|
||||
|
||||
with op.batch_alter_table(
|
||||
"nonebot_bison_scheduletimeweight", schema=None
|
||||
) as batch_op:
|
||||
with op.batch_alter_table("nonebot_bison_scheduletimeweight", schema=None) as batch_op:
|
||||
batch_op.alter_column("weight", existing_type=sa.INTEGER(), nullable=True)
|
||||
batch_op.alter_column("end_time", existing_type=sa.TIME(), nullable=True)
|
||||
batch_op.alter_column("start_time", existing_type=sa.TIME(), nullable=True)
|
||||
|
||||
@@ -8,8 +8,8 @@ Create Date: 2023-03-02 14:04:16.492133
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.ext.automap import automap_base
|
||||
from sqlalchemy.orm import Session
|
||||
from sqlalchemy.ext.automap import automap_base
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "bd92923c218f"
|
||||
|
||||
Reference in New Issue
Block a user