require type_mapping for geometry tables

Closes #91
master
Oliver Tonnhofer 2017-05-12 15:04:39 +02:00
parent 18d14fbb9a
commit 55e37a0aff
1 changed files with 6 additions and 0 deletions

View File

@ -122,6 +122,12 @@ func (m *Mapping) prepare() error {
if t.Type == "" {
return errors.Errorf("missing type for table %s", name)
}
if TableType(t.Type) == GeometryTable {
if t.Mapping != nil || t.Mappings != nil {
return errors.Errorf("table with type:geometry requires type_mapping for table %s", name)
}
}
}
for name, t := range m.Conf.GeneralizedTables {