mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:21:10 +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> |
||
|---|---|---|
| .. | ||
| 001_central_stories_foundation.sql | ||
| 001_create_user_settings_table.sql | ||
| 002_insert_sample_creators.sql | ||
| 003_add_public_characters.sql | ||
| 004_create_feedback_system.sql | ||
| 005_add_blurhash_to_images.sql | ||
| 005_fix_feedback_vote_trigger.sql | ||
| 006_create_error_logs_table.sql | ||
| add_favorite_to_stories.sql | ||
| add_is_favorite_to_stories.sql | ||
| add_publishing_fields_to_stories.sql | ||
| add_sharing_columns_to_characters.sql | ||
| create_character_collections_table.sql | ||
| create_character_votes_table.sql | ||
| create_story_logbooks_table.sql | ||
| create_story_votes_table.sql | ||
| README.md | ||
| run-migration.sh | ||
| simplify_sharing_options.sql | ||
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! ⭐