Refactors lightning account naming

Standardizes lightning account name to "Assets:Bitcoin:Lightning" for consistency.

Updates the database and code to reflect this change, ensuring that payment processing and account management use the new name.
Prevents polling of receivable dialog after settlement.
This commit is contained in:
padreug 2025-10-23 04:10:06 +02:00
parent 8a961e1331
commit 49f21da55a
3 changed files with 61 additions and 31 deletions

View file

@ -217,7 +217,7 @@ async def m006_hierarchical_account_names(db):
# Assets
"cash": "Assets:Cash",
"bank": "Assets:Bank",
"lightning": "Assets:Lightning:Balance",
"lightning": "Assets:Bitcoin:Lightning",
"accounts_receivable": "Assets:Receivable",
# Liabilities
@ -318,3 +318,17 @@ async def m007_balance_assertions(db):
CREATE INDEX idx_balance_assertions_date ON balance_assertions (date);
"""
)
async def m008_rename_lightning_account(db):
"""
Rename Lightning account from Assets:Lightning:Balance to Assets:Bitcoin:Lightning
for better naming consistency.
"""
await db.execute(
"""
UPDATE accounts
SET name = 'Assets:Bitcoin:Lightning'
WHERE name = 'Assets:Lightning:Balance'
"""
)