agent-workspace / supabase /tables /writing_sessions.sql
luom2645's picture
Add files using upload-large-folder tool
62e1b50 verified
Raw History Blame Contribute Delete
511 Bytes
CREATE TABLE writing_sessions (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID NOT NULL,
project_id UUID,
chapter_id UUID,
session_start TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc',
now()),
session_end TIMESTAMP WITH TIME ZONE,
words_written INTEGER DEFAULT 0,
session_type TEXT DEFAULT 'writing' CHECK (session_type IN ('writing',
'editing',
'planning',
'research')),
created_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc',
now())
);