From f291ce993e6cbb0ff43b49cc00a6d1100d7cef35 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Fri, 22 Oct 2021 09:44:53 +0100 Subject: [PATCH] New table to store extra tags/keys We get the OSM tags/keys for matching from the item types in Wikidata. Sometimes we want to check extra tags/keys without adding them to Wikidata. This new table is a place to store them, instead of having them in the source code. In the future normal users will be able to add or remove extra tags/keys. --- matcher/model.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/matcher/model.py b/matcher/model.py index 4a8ea5b..f4c83b7 100644 --- a/matcher/model.py +++ b/matcher/model.py @@ -392,3 +392,11 @@ class SkipIsA(Base): item_id = Column(Integer, ForeignKey('item.item_id'), primary_key=True) item = relationship('Item') + +class ItemExtraKeys(Base): + __tablename__ = 'item_extra_keys' + item_id = Column(Integer, ForeignKey('item.item_id'), primary_key=True) + tag_or_key = Column(String, primary_key=True) + note = Column(String) + + item = relationship('Item')