Support multiple primary keys in schema, part 2. Part of #280