Spaces:
Sleeping
Sleeping
File size: 630 Bytes
0ebb4d1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | -- ============================================================
-- Cielo user-state table — run once in the Supabase SQL editor
-- Tracks one-time flags per user (e.g. "has Cielo already asked about Italian?")
-- ============================================================
CREATE TABLE IF NOT EXISTS cielo_user_state (
user_id TEXT PRIMARY KEY,
asked_italian BOOLEAN DEFAULT FALSE,
updated_at TIMESTAMPTZ DEFAULT now()
);
ALTER TABLE cielo_user_state ENABLE ROW LEVEL SECURITY;
CREATE POLICY "service_role_all_cielo_state" ON cielo_user_state
FOR ALL TO service_role USING (true) WITH CHECK (true);
|