Add unique index on internal_code