mirror of
https://github.com/bitbaum/botsmann.git
synced 2026-12-04 04:47:45 +01:00
- Add @~/.claude/CLAUDE.md import for global engineering standards - Update Last Updated date to 2026-01-23 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
24 lines
741 B
SQL
24 lines
741 B
SQL
-- Waitlist table for early signups
|
|
|
|
CREATE TABLE IF NOT EXISTS waitlist (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
email TEXT NOT NULL UNIQUE,
|
|
preferences JSONB DEFAULT '{}'::jsonb,
|
|
created_at TIMESTAMPTZ DEFAULT NOW()
|
|
);
|
|
|
|
-- Enable RLS
|
|
ALTER TABLE waitlist ENABLE ROW LEVEL SECURITY;
|
|
|
|
-- Allow anonymous inserts (public waitlist)
|
|
CREATE POLICY "Allow anonymous insert" ON waitlist
|
|
FOR INSERT TO anon
|
|
WITH CHECK (true);
|
|
|
|
-- Allow authenticated users to read their own entries by email (optional)
|
|
-- NOTE: Matching by email requires the same email as auth identity; typically we don't expose read.
|
|
-- Keeping SELECT closed unless via service role.
|
|
|
|
COMMENT ON TABLE waitlist IS 'Public waitlist signups with preferences';
|
|
|