Cannot insert_many with optional fields
Alternatively, row_dict would have to be generated for every row, which could result in a significant slowdown.

Actually, looking over it again, neither this nor the option above will work. The suggestion from the original issue will fail to insert optional fields if the first inserted row doesn't have all optional fields defined, generating row_dict for every row will result in uneven VALUES parameters, which will fail on insert.

This could be a decent substitute: 
```python
if not have_fields:
    fields = list(set().union(*(row.keys() for row in query._iter_rows())))
    fields.sort()
    have_fields = True
``` As you pointed out, a bulk insert query cannot have different values clauses as far as I know, so the difference has to be made up at query construction time... I'll give it some thought. @coleifer I currently have it running with the above code on L2104 and onwards, passes tests and seems to perform as expected. Basically just builds a fields list using the set of all keys in the dict, only happens once per query, so the performance impact shouldn't be too huge, though it doesn't scale too well for very large insert sets. > though it doesn't scale too well for very large insert sets.

Exactly the problem. Check out dd0af77a51b660a8804c6c97115f57d9596e54f2 in 3.0a branch. Think I'm going to close this one, as it should be resolved (generally) for 3.0a.
Model.insert_many() fails if the keys of optional fields are omitted in the dictionary, specifically if _some_ of the objects contain the optional keys and some do not:

Example
---------

```python
db = SqliteDatabase('test.db')

class MyModel(Model):
    my_id = PrimaryKeyField()
    required_field = CharField()
    optional_field = TextField(null=True)

    class Meta:
        database = db
```

```python
entity_list = [
    { 'my_id': 12345, 'required_field': 'Test', 'optional_field': 'Test Text'},
    { 'my_id': 12346, 'required_field': 'Test2'}
]

with db.atomic():
    MyModel.insert_many(entity_list).execute()
```

Observed Result
-----------------

`KeyError` triggered in `QueryCompiler.generate_insert()`, specifically [peewee.py#L2111](https://github.com/coleifer/peewee/blob/cacb86a2ee6c808ebda1062be53f5824aa847f48/peewee.py#L2111)

Expected Result
----------------

Records `12345` and `12346` created in table `test.mymodel`.

Might be achievable by simply changing the line linked above to `value = row_dict.get(field, None)`, preliminary test is promising.
  