agent-workspace / supabase /tables /chapters.sql
luom2645's picture
Add files using upload-large-folder tool
62e1b50 verified
Raw History Blame Contribute Delete
513 Bytes
CREATE TABLE chapters (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
project_id UUID NOT NULL,
title TEXT NOT NULL,
content TEXT DEFAULT '',
chapter_number INTEGER NOT NULL,
word_count INTEGER DEFAULT 0,
status TEXT DEFAULT 'draft' CHECK (status IN ('draft',
'in_progress',
'completed',
'published')),
notes TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc',
now()),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc',
now())
);