Files
editor/supabase/migrations/20240216000001_add_community_fields.sql
T
Aymeric RabotandClaude Opus 4.6 aa27e0dd7a refactor: move supabase config to repo root, fix port and env setup
- Move supabase/ from packages/db/ to repo root for simpler CLI usage
- Use custom ports (553xx) to avoid conflicts with other local Supabase instances
- Add --env-mode=loose to turbo dev so root .env vars reach Next.js
- Remove hardcoded --port 3000 from next dev (reads PORT env var instead)
- Add .env.example with Supabase env var placeholders
- Add supabase local state dirs to .gitignore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-18 01:48:53 -05:00

14 lines
792 B
SQL

-- Add community features to properties table
ALTER TABLE properties ADD COLUMN IF NOT EXISTS is_private BOOLEAN NOT NULL DEFAULT true;
ALTER TABLE properties ADD COLUMN IF NOT EXISTS views INTEGER NOT NULL DEFAULT 0;
ALTER TABLE properties ADD COLUMN IF NOT EXISTS likes INTEGER NOT NULL DEFAULT 0;
ALTER TABLE properties ADD COLUMN IF NOT EXISTS thumbnail_url TEXT;
-- Create indexes for community queries
CREATE INDEX IF NOT EXISTS idx_properties_is_private ON properties(is_private) WHERE is_private = false;
CREATE INDEX IF NOT EXISTS idx_properties_views ON properties(views DESC);
CREATE INDEX IF NOT EXISTS idx_properties_likes ON properties(likes DESC);
-- Set existing properties to private (user opt-in to share)
UPDATE properties SET is_private = true WHERE is_private IS NULL;