From c4b7535012ba4765a2b8e2e25ca99200fc1a3f6e Mon Sep 17 00:00:00 2001 From: Adrian Edwards Date: Fri, 1 May 2026 17:30:35 -0400 Subject: [PATCH] Revert "AugurSetting table is unused" and rename the class This reverts commit 22d2ed16bb8d02aba2ce4425fe1ef0cc4c88267b. Signed-off-by: Adrian Edwards --- collectoss/application/db/models/__init__.py | 1 + .../application/db/models/augur_operations.py | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/collectoss/application/db/models/__init__.py b/collectoss/application/db/models/__init__.py index d9577c40b..bed0e4c8e 100644 --- a/collectoss/application/db/models/__init__.py +++ b/collectoss/application/db/models/__init__.py @@ -96,6 +96,7 @@ ) from collectoss.application.db.models.augur_operations import ( + Settings, WorkerHistory, WorkerJob, WorkerOauth, diff --git a/collectoss/application/db/models/augur_operations.py b/collectoss/application/db/models/augur_operations.py index 51b26e935..41a4cef6b 100644 --- a/collectoss/application/db/models/augur_operations.py +++ b/collectoss/application/db/models/augur_operations.py @@ -87,6 +87,26 @@ def retrieve_owner_repos(session, owner: str) -> List[str]: ) +class Settings(Base): + __tablename__ = "augur_settings" + __table_args__ = { + "schema": "augur_operations", + "comment": "CollectOSS settings include the schema version, and the CollectOSS API Key as of 10/25/2020. Future augur settings may be stored in this table, which has the basic structure of a name-value pair. ", + } + + id = Column( + BigInteger, + Sequence("augur_settings_id_seq", start=1, schema="augur_operations"), + primary_key=True, + server_default=text( + "nextval('augur_operations.augur_settings_id_seq'::regclass)" + ), + ) + setting = Column(String) + value = Column(String) + last_modified = Column(TIMESTAMP(precision=0), server_default=text("CURRENT_DATE")) + + t_repos_fetch_log = Table( "repos_fetch_log", metadata,