diff --git a/lnbits/core/migrations.py b/lnbits/core/migrations.py index d7e0e186d..499adad6b 100644 --- a/lnbits/core/migrations.py +++ b/lnbits/core/migrations.py @@ -273,10 +273,12 @@ async def m008_create_admin_settings_table(db): async def m009_create_tinyurl_table(db): await db.execute( - """ + f""" CREATE TABLE IF NOT EXISTS tiny_url ( id TEXT PRIMARY KEY, - url TEXT + url TEXT, + endless BOOL NOT NULL DEFAULT false, + time TIMESTAMP NOT NULL DEFAULT {db.timestamp_now}, ); """ ) diff --git a/lnbits/core/models.py b/lnbits/core/models.py index 4b5094961..19e597769 100644 --- a/lnbits/core/models.py +++ b/lnbits/core/models.py @@ -218,6 +218,8 @@ class BalanceCheck(BaseModel): class TinyURL(BaseModel): id: str url: str + endless: bool + time: float @classmethod def from_row(cls, row: Row):