nostrclient/migrations.py
Vlad Stan a119c3836a
Improve stability (#25)
* chore: increase log level

* feat: secure relays endpoint

* feat: add config for the extension

* chore: update `min_lnbits_version`

* chore: improve logging

* fix: decrypt logic

* chore: improve logs
2024-01-22 13:46:22 +02:00

25 lines
548 B
Python

async def m001_initial(db):
"""
Initial nostrclient table.
"""
await db.execute(
"""
CREATE TABLE nostrclient.relays (
id TEXT NOT NULL PRIMARY KEY,
url TEXT NOT NULL,
active BOOLEAN DEFAULT true
);
"""
)
async def m002_create_config_table(db):
"""
Allow the extension to persist and retrieve any number of config values.
"""
await db.execute(
"""CREATE TABLE nostrclient.config (
json_data TEXT NOT NULL
);"""
)