From 55e37a0aff77371e1442d40ec23b57a39523dcf7 Mon Sep 17 00:00:00 2001 From: Oliver Tonnhofer Date: Fri, 12 May 2017 15:04:39 +0200 Subject: [PATCH] require type_mapping for geometry tables Closes #91 --- mapping/mapping.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mapping/mapping.go b/mapping/mapping.go index 4cd5446..60a776d 100644 --- a/mapping/mapping.go +++ b/mapping/mapping.go @@ -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 {