fix that AcceptNewFields does not take into account the primary-key; fix #518

This commit is contained in:
qdequele 2020-03-11 12:00:40 +01:00
parent 14c1aba6c7
commit c25641ff2d
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
2 changed files with 63 additions and 2 deletions

View file

@ -63,8 +63,10 @@ impl Schema {
let id = self.insert(name)?;
self.primary_key = Some(id);
self.set_indexed(name)?;
self.set_displayed(name)?;
if self.accept_new_fields {
self.set_indexed(name)?;
self.set_displayed(name)?;
}
Ok(id)
}