Add foreign key constraints to issue metadata