WIP nostr nip5 extension

This commit is contained in:
Lee Salminen
2022-12-20 06:28:43 -06:00
parent c5fdd35078
commit 3ca9edeee6
13 changed files with 1409 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
async def m001_initial_invoices(db):
await db.execute(
f"""
CREATE TABLE nostrnip5.domains (
id TEXT PRIMARY KEY,
wallet TEXT NOT NULL,
currency TEXT NOT NULL,
amount INTEGER NOT NULL,
domain TEXT NOT NULL,
time TIMESTAMP NOT NULL DEFAULT {db.timestamp_now}
);
"""
)
await db.execute(
f"""
CREATE TABLE nostrnip5.addresses (
id TEXT PRIMARY KEY,
domain_id TEXT NOT NULL,
local_part TEXT NOT NULL,
pubkey TEXT NOT NULL,
active BOOLEAN NOT NULL DEFAULT false,
time TIMESTAMP NOT NULL DEFAULT {db.timestamp_now},
FOREIGN KEY(domain_id) REFERENCES {db.references_schema}domains(id)
);
"""
)