Feature: Subscription-Tier-System (standard/pro/breeder + _test), has_pro_access(), Admin-Tier-UI (SW by-v734)
This commit is contained in:
parent
bcc7c27556
commit
71f29dcce0
8 changed files with 104 additions and 12 deletions
|
|
@ -2075,6 +2075,14 @@ def _migrate(conn_factory):
|
|||
_seed_help_articles(conn)
|
||||
logger.info("Migration: Hilfe/FAQ-Tabelle bereit.")
|
||||
|
||||
# ---- Feature: Subscription-Tier ----
|
||||
try:
|
||||
conn.execute("ALTER TABLE users ADD COLUMN subscription_tier TEXT DEFAULT 'standard'")
|
||||
conn.execute("CREATE INDEX IF NOT EXISTS idx_users_tier ON users(subscription_tier)")
|
||||
logger.info("Migration: subscription_tier Spalte hinzugefügt.")
|
||||
except Exception:
|
||||
pass # Spalte existiert bereits
|
||||
|
||||
|
||||
def _seed_help_articles(conn):
|
||||
"""Befüllt help_articles mit Starter-FAQs — nur wenn die Tabelle noch leer ist."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue