-- Add pinned, locked and activity tracking to forum threads
ALTER TABLE forum_threads ADD COLUMN is_pinned TINYINT(1) NOT NULL DEFAULT 0;
ALTER TABLE forum_threads ADD COLUMN is_locked TINYINT(1) NOT NULL DEFAULT 0;
ALTER TABLE forum_threads ADD COLUMN last_activity_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP;

-- Initialize last_activity_at with created_at for existing threads
UPDATE forum_threads SET last_activity_at = created_at;
