-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from Sevenyine/dev
点赞功能的半成品
- Loading branch information
Showing
7 changed files
with
164 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
"""add_like | ||
Revision ID: 01a750736ea0 | ||
Revises: 449e066410fd | ||
Create Date: 2023-10-21 23:59:18.971313 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "01a750736ea0" | ||
down_revision = "449e066410fd" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"nonebot_plugin_bottle_like", | ||
sa.Column("id", sa.Integer(), nullable=False), | ||
sa.Column("user_id", sa.BigInteger(), nullable=False), | ||
sa.Column("bottle_id", sa.Integer(), nullable=False), | ||
sa.PrimaryKeyConstraint("id"), | ||
sa.UniqueConstraint("user_id", "bottle_id"), | ||
) | ||
with op.batch_alter_table("nonebot_plugin_bottle_bottle", schema=None) as batch_op: | ||
batch_op.add_column( | ||
sa.Column( | ||
"like", | ||
sa.Integer(), | ||
nullable=False, | ||
server_default=sa.schema.DefaultClause("0") | ||
), | ||
|
||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table("nonebot_plugin_bottle_like") | ||
with op.batch_alter_table("nonebot_plugin_bottle_bottle", schema=None) as batch_op: | ||
batch_op.drop_column("like") | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "nonebot_plugin_bottle" | ||
version = "1.0.2.3" | ||
version = "2.0.0.0" | ||
description = "Bottle post plugin in Nonebot" | ||
authors = ["Todysheep <[email protected]>"] | ||
license = "GNU GPLv3" | ||
|