-- V7: Add view_count to discussion table.
-- Tracks how many times a discussion has been viewed.
ALTER TABLE discussion ADD COLUMN IF NOT EXISTS view_count INTEGER NOT NULL DEFAULT 0;

CREATE INDEX IF NOT EXISTS idx_discussion_view_count ON discussion(view_count);
