mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-02 12:22:40 +02:00
Merge branch 'MODSetter:dev' into dev
This commit is contained in:
commit
aefe1b6e0d
3 changed files with 834 additions and 63 deletions
|
|
@ -0,0 +1,33 @@
|
|||
"""Add DISCORD_JOIN to incentive task type enum
|
||||
|
||||
Revision ID: 91
|
||||
Revises: 90
|
||||
|
||||
Changes:
|
||||
1. Add DISCORD_JOIN value to incentivetasktype enum
|
||||
"""
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "91"
|
||||
down_revision: str | None = "90"
|
||||
branch_labels: str | Sequence[str] | None = None
|
||||
depends_on: str | Sequence[str] | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Add DISCORD_JOIN to incentivetasktype enum."""
|
||||
op.execute("ALTER TYPE incentivetasktype ADD VALUE IF NOT EXISTS 'DISCORD_JOIN'")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Remove DISCORD_JOIN from incentivetasktype enum.
|
||||
|
||||
Note: PostgreSQL doesn't support removing values from enums directly.
|
||||
This would require recreating the enum type, which is complex and risky.
|
||||
For safety, we leave the enum value in place during downgrade.
|
||||
"""
|
||||
pass
|
||||
|
|
@ -164,6 +164,7 @@ class IncentiveTaskType(str, Enum):
|
|||
|
||||
GITHUB_STAR = "GITHUB_STAR"
|
||||
REDDIT_FOLLOW = "REDDIT_FOLLOW"
|
||||
DISCORD_JOIN = "DISCORD_JOIN"
|
||||
# Future tasks can be added here:
|
||||
# GITHUB_ISSUE = "GITHUB_ISSUE"
|
||||
# SOCIAL_SHARE = "SOCIAL_SHARE"
|
||||
|
|
@ -185,6 +186,12 @@ INCENTIVE_TASKS_CONFIG = {
|
|||
"pages_reward": 100,
|
||||
"action_url": "https://www.reddit.com/r/SurfSense/",
|
||||
},
|
||||
IncentiveTaskType.DISCORD_JOIN: {
|
||||
"title": "Join our Discord",
|
||||
"description": "Join the SurfSense community on Discord",
|
||||
"pages_reward": 100,
|
||||
"action_url": "https://discord.gg/ejRNvftDp9",
|
||||
},
|
||||
# Future tasks can be configured here:
|
||||
# IncentiveTaskType.GITHUB_ISSUE: {
|
||||
# "title": "Create an issue",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue