diff --git a/src/integrations/supabase/types.ts b/src/integrations/supabase/types.ts index c14cdddc..c5e62549 100644 --- a/src/integrations/supabase/types.ts +++ b/src/integrations/supabase/types.ts @@ -2111,7 +2111,6 @@ export type Database = { description: string | null id: string is_public: boolean | null - items: Json list_type: string title: string updated_at: string @@ -2122,7 +2121,6 @@ export type Database = { description?: string | null id?: string is_public?: boolean | null - items: Json list_type: string title: string updated_at?: string @@ -2133,7 +2131,6 @@ export type Database = { description?: string | null id?: string is_public?: boolean | null - items?: Json list_type?: string title?: string updated_at?: string diff --git a/supabase/migrations/20251003141905_ff60a3f1-c70d-47a6-943c-249eaeedf820.sql b/supabase/migrations/20251003141905_ff60a3f1-c70d-47a6-943c-249eaeedf820.sql new file mode 100644 index 00000000..0833c352 --- /dev/null +++ b/supabase/migrations/20251003141905_ff60a3f1-c70d-47a6-943c-249eaeedf820.sql @@ -0,0 +1,18 @@ +-- ═══════════════════════════════════════════════════════════════════ +-- MIGRATION: Remove Legacy items Column from user_top_lists +-- ═══════════════════════════════════════════════════════════════════ +-- +-- This migration removes the deprecated items jsonb column from +-- user_top_lists table. List items are now stored relationally in +-- the user_top_list_items table. +-- +-- SAFETY: Verified that no data exists in the items column and all +-- code references use the relational user_top_list_items table. +-- ═══════════════════════════════════════════════════════════════════ + +-- Drop the legacy items column +ALTER TABLE user_top_lists + DROP COLUMN IF EXISTS items; + +-- Add comment to document the relational approach +COMMENT ON TABLE user_top_list_items IS 'Stores list items relationally - replaces user_top_lists.items JSON column'; \ No newline at end of file