2020-12-28 19:51:45 +01:00
|
|
|
async def m001_initial(db):
|
|
|
|
|
|
|
|
await db.execute(
|
|
|
|
"""
|
2021-06-22 04:22:52 +02:00
|
|
|
CREATE TABLE subdomains.domain (
|
2020-12-28 19:51:45 +01:00
|
|
|
id TEXT PRIMARY KEY,
|
|
|
|
wallet TEXT NOT NULL,
|
2020-12-28 22:32:04 +01:00
|
|
|
domain TEXT NOT NULL,
|
2020-12-28 19:51:45 +01:00
|
|
|
webhook TEXT,
|
|
|
|
cf_token TEXT NOT NULL,
|
|
|
|
cf_zone_id TEXT NOT NULL,
|
|
|
|
description TEXT NOT NULL,
|
|
|
|
cost INTEGER NOT NULL,
|
|
|
|
amountmade INTEGER NOT NULL,
|
2020-12-31 18:39:16 +01:00
|
|
|
allowed_record_types TEXT NOT NULL,
|
2021-07-03 17:08:18 +02:00
|
|
|
time TIMESTAMP NOT NULL DEFAULT """
|
|
|
|
+ db.timestamp_now
|
|
|
|
+ """
|
2020-12-28 19:51:45 +01:00
|
|
|
);
|
|
|
|
"""
|
|
|
|
)
|
|
|
|
|
|
|
|
await db.execute(
|
|
|
|
"""
|
2021-06-22 04:22:52 +02:00
|
|
|
CREATE TABLE subdomains.subdomain (
|
2020-12-28 19:51:45 +01:00
|
|
|
id TEXT PRIMARY KEY,
|
2020-12-28 22:32:04 +01:00
|
|
|
domain TEXT NOT NULL,
|
2020-12-28 19:51:45 +01:00
|
|
|
email TEXT NOT NULL,
|
|
|
|
subdomain TEXT NOT NULL,
|
|
|
|
ip TEXT NOT NULL,
|
|
|
|
wallet TEXT NOT NULL,
|
|
|
|
sats INTEGER NOT NULL,
|
2020-12-29 20:52:54 +01:00
|
|
|
duration INTEGER NOT NULL,
|
2020-12-28 19:51:45 +01:00
|
|
|
paid BOOLEAN NOT NULL,
|
2020-12-31 18:39:16 +01:00
|
|
|
record_type TEXT NOT NULL,
|
2021-07-03 17:08:18 +02:00
|
|
|
time TIMESTAMP NOT NULL DEFAULT """
|
|
|
|
+ db.timestamp_now
|
|
|
|
+ """
|
2020-12-28 19:51:45 +01:00
|
|
|
);
|
|
|
|
"""
|
2020-12-31 18:50:16 +01:00
|
|
|
)
|