ALTER TABLE versions ADD CONSTRAINT unique_num UNIQUE (package_id, num);