Add Lamassu database configuration: implement CRUD operations, polling tasks, and UI components for managing database settings. Introduce hourly transaction polling and manual poll functionality.

This commit is contained in:
padreug 2025-06-18 10:56:05 +02:00
parent c9f7140d95
commit 1f7999a556
9 changed files with 870 additions and 5 deletions

View file

@ -93,3 +93,26 @@ async def m005_create_dca_payments(db):
);
"""
)
async def m006_create_lamassu_config(db):
"""
Create Lamassu database configuration table.
"""
await db.execute(
f"""
CREATE TABLE myextension.lamassu_config (
id TEXT PRIMARY KEY NOT NULL,
host TEXT NOT NULL,
port INTEGER NOT NULL DEFAULT 5432,
database_name TEXT NOT NULL,
username TEXT NOT NULL,
password TEXT NOT NULL,
is_active BOOLEAN NOT NULL DEFAULT true,
test_connection_last TIMESTAMP,
test_connection_success BOOLEAN,
created_at TIMESTAMP NOT NULL DEFAULT {db.timestamp_now},
updated_at TIMESTAMP NOT NULL DEFAULT {db.timestamp_now}
);
"""
)