dspace_statistics_api/indexer.py: Use UUID

DSpace 6+ uses a UUID for item identifiers instead of an integer so
we need to update the PostgreSQL schema accordingly. Solr still re-
fers to them as "id" in its schema so we don't need to change anyt-
hing there.
This commit is contained in:
Alan Orth 2020-03-01 15:42:38 +02:00
parent 82be1a4d00
commit 250fd8164f
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ with DatabaseManager() as db:
# create table to store item views and downloads
cursor.execute(
"""CREATE TABLE IF NOT EXISTS items
(id INT PRIMARY KEY, views INT DEFAULT 0, downloads INT DEFAULT 0)"""
(id UUID PRIMARY KEY, views INT DEFAULT 0, downloads INT DEFAULT 0)"""
)
# commit the table creation before closing the database connection