feat: keep customer profiles up to date

This commit is contained in:
Vlad Stan 2023-03-27 17:19:51 +03:00
parent e7b16dd17f
commit 89f46fff35
7 changed files with 175 additions and 5 deletions

View file

@ -125,3 +125,17 @@ async def m001_initial(db):
await db.execute(
"CREATE INDEX idx_event_id ON nostrmarket.direct_messages (event_id)"
)
"""
Initial customers table.
"""
await db.execute(
"""
CREATE TABLE nostrmarket.customers (
merchant_id TEXT NOT NULL,
public_key TEXT NOT NULL,
event_created_at INTEGER,
meta TEXT NOT NULL DEFAULT '{}'
);
"""
)