-- Fork relationship: a repo created as a fork points at its parent. The parent
-- surviving a fork means renames are metadata-only; deleting a parent detaches.
ALTER TABLE repos ADD COLUMN fork_parent_id TEXT REFERENCES repos(id) ON DELETE SET NULL;
