Added timestamp and endless
For future culling of links. If endless is not specified, then links older than x could be removed
This commit is contained in:
parent
0d0817044c
commit
e53ccb04ac
|
@ -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},
|
||||
);
|
||||
"""
|
||||
)
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user