[adapters] Use an adapter for serializing entities to a bare python structure
which may be used for e.g. JSON export or other and allow to have different
serializations for each entity types.
Closes #6378035
if repo.system_source.dbdriver == 'postgres':
sql('ALTER TABLE appears ADD COLUMN weight float')
sql('UPDATE appears SET weight=1.0 ')