mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:21:09 +02:00
Projects included: - maerchenzauber (NestJS backend + Expo mobile + SvelteKit web + Astro landing) - manacore (Expo mobile + SvelteKit web + Astro landing) - manadeck (NestJS backend + Expo mobile + SvelteKit web) - memoro (Expo mobile + SvelteKit web + Astro landing) This commit preserves the current state before monorepo restructuring. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1.2 KiB
1.2 KiB
Migration: Add is_favorite to stories
Problem
Die is_favorite Spalte fehlt in der stories Tabelle in Supabase.
Lösung
Führe folgendes SQL in Supabase Dashboard > SQL Editor aus:
-- Add is_favorite column to stories table
ALTER TABLE stories
ADD COLUMN IF NOT EXISTS is_favorite BOOLEAN DEFAULT false;
-- Create index for faster filtering
CREATE INDEX IF NOT EXISTS idx_stories_is_favorite
ON stories(user_id, is_favorite)
WHERE is_favorite = true;
-- Add comment
COMMENT ON COLUMN stories.is_favorite IS 'Indicates if the story owner has marked it as a favorite';
Schritte
- Öffne Supabase Dashboard
- Wähle dein Projekt:
maerchenzauber - Gehe zu SQL Editor (links in der Sidebar)
- Klicke New Query
- Kopiere und füge das obige SQL ein
- Klicke Run (oder drücke Cmd+Enter)
Verifizierung
Nach der Migration:
-- Check if column exists
SELECT column_name, data_type, is_nullable, column_default
FROM information_schema.columns
WHERE table_name = 'stories'
AND column_name = 'is_favorite';
Nach der Migration
Die Favoriten-Funktionalität sollte dann funktionieren! ⭐