mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-22 14:25:01 +01:00
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:
parent
82be1a4d00
commit
250fd8164f
@ -264,7 +264,7 @@ with DatabaseManager() as db:
|
|||||||
# create table to store item views and downloads
|
# create table to store item views and downloads
|
||||||
cursor.execute(
|
cursor.execute(
|
||||||
"""CREATE TABLE IF NOT EXISTS items
|
"""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
|
# commit the table creation before closing the database connection
|
||||||
|
Loading…
Reference in New Issue
Block a user