ttrss: Fix issue with installing after an uninstalling

Tests:

- Without the patch, uninstall and reinstall will fail. With patch it passes.

- Rerunning setup does not destroy the contents of the database.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2025-01-26 10:50:21 -05:00
1 parent b99ead7aa6
commit 9aa3203733
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@ class TTRSSApp(app_module.App):
app_id = 'ttrss'
_version = 6
_version = 7
def __init__(self) -> None:
"""Create components for the app."""
+6
View File
@@ -77,6 +77,12 @@ def setup():
aug.save()
config = _get_database_config()
# dbconfig may not always setup the database and user account correctly.
# Following, operation to create database/user is an idempotent operation.
postgres.create_database(config['database'], config['user'],
config['password'])
if action_utils.service_is_enabled('tt-rss'):
action_utils.service_restart('tt-rss')