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.
This commit is contained in:
Edward Betts 2021-10-22 09:44:53 +01:00
parent c1fc249a14
commit f291ce993e

View file

@ -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')