mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-20 02:28:10 +01:00
40 lines
1.0 KiB
Python
40 lines
1.0 KiB
Python
async def m001_initial(db):
|
|
await db.execute(
|
|
"""
|
|
CREATE TABLE lnaddress.domain (
|
|
id TEXT PRIMARY KEY,
|
|
wallet TEXT NOT NULL,
|
|
domain TEXT NOT NULL,
|
|
webhook TEXT,
|
|
cf_token TEXT NOT NULL,
|
|
cf_zone_id TEXT NOT NULL,
|
|
cost INTEGER NOT NULL,
|
|
time TIMESTAMP NOT NULL DEFAULT """
|
|
+ db.timestamp_now
|
|
+ """
|
|
);
|
|
"""
|
|
)
|
|
|
|
|
|
async def m002_addresses(db):
|
|
await db.execute(
|
|
"""
|
|
CREATE TABLE lnaddress.address (
|
|
id TEXT PRIMARY KEY,
|
|
wallet TEXT NOT NULL,
|
|
domain TEXT NOT NULL,
|
|
email TEXT,
|
|
username TEXT NOT NULL,
|
|
wallet_key TEXT NOT NULL,
|
|
wallet_endpoint TEXT NOT NULL,
|
|
sats INTEGER NOT NULL,
|
|
duration INTEGER NOT NULL,
|
|
paid BOOLEAN NOT NULL,
|
|
time TIMESTAMP NOT NULL DEFAULT """
|
|
+ db.timestamp_now
|
|
+ """
|
|
);
|
|
"""
|
|
)
|