diff --git a/alembic/versions/a4f240bbc8f9_add_click_count.py b/alembic/versions/a4f240bbc8f9_add_click_count.py
new file mode 100644
index 0000000..a7f13d7
--- /dev/null
+++ b/alembic/versions/a4f240bbc8f9_add_click_count.py
@@ -0,0 +1,26 @@
+"""Add click count
+
+Revision ID: a4f240bbc8f9
+Revises: 68d7e4ed662a
+Create Date: 2024-02-15 08:37:31.433274
+
+"""
+from typing import Sequence, Union
+
+import sqlalchemy as sa
+
+from alembic import op
+
+# revision identifiers, used by Alembic.
+revision: str = "a4f240bbc8f9"
+down_revision: Union[str, None] = "68d7e4ed662a"
+branch_labels: Union[str, Sequence[str], None] = None
+depends_on: Union[str, Sequence[str], None] = None
+
+
+def upgrade() -> None:
+ op.add_column("shorts", sa.Column("clicks", sa.Integer(), nullable=False))
+
+
+def downgrade() -> None:
+ op.drop_column("shorts", "clicks")
diff --git a/go_ji/db.py b/go_ji/db.py
index 5ae2569..b0397a5 100644
--- a/go_ji/db.py
+++ b/go_ji/db.py
@@ -45,6 +45,7 @@ class Short(Base):
id: Mapped[int] = mapped_column(primary_key=True)
slug: Mapped[str] = mapped_column(Text(), nullable=False, unique=True)
longs: Mapped[List["Long"]] = relationship(back_populates="short")
+ clicks: Mapped[int] = mapped_column(default=0, nullable=False)
created_at: Mapped[datetime] = mapped_column(nullable=False, default=func.now())