Fixes index creation problems with schema

Fixes https://github.com/coleifer/peewee/issues/303