-- 021: space kind — 'project' (workspace w/ projects+tasks) or 'docs' (pure documentation repo)
ALTER TABLE spaces ADD COLUMN IF NOT EXISTS kind text NOT NULL DEFAULT 'project';
ALTER TABLE spaces DROP CONSTRAINT IF EXISTS spaces_kind_check;
ALTER TABLE spaces ADD CONSTRAINT spaces_kind_check CHECK (kind IN ('project','docs'));
UPDATE spaces SET kind='docs' WHERE slug='wiki';
