From e1b31ea064fec2ed0eed763488785f2ed4e6a3b0 Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Thu, 25 Jul 2024 12:44:23 +0000 Subject: [PATCH] fix migration for postgres --- migrations.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/migrations.py b/migrations.py index a499866..0da1278 100644 --- a/migrations.py +++ b/migrations.py @@ -18,9 +18,9 @@ async def m001_initial(db): ) await db.execute( - """ + f""" CREATE TABLE nwcprovider.spent ( - id INTEGER PRIMARY KEY AUTOINCREMENT, + id {db.serial_primary_key}, pubkey TEXT NOT NULL, amount_msats INTEGER NOT NULL, created_at INTEGER NOT NULL, @@ -30,9 +30,9 @@ async def m001_initial(db): ) await db.execute( - """ + f""" CREATE TABLE nwcprovider.logs ( - id INTEGER PRIMARY KEY AUTOINCREMENT, + id {db.serial_primary_key}, pubkey TEXT NOT NULL, payload TEXT NOT NULL, created_at INTEGER NOT NULL, @@ -42,9 +42,9 @@ async def m001_initial(db): ) await db.execute( - """ + f""" CREATE TABLE nwcprovider.budgets ( - id INTEGER PRIMARY KEY AUTOINCREMENT, + id {db.serial_primary_key}, pubkey TEXT NOT NULL, budget_msats INTEGER NOT NULL, refresh_window INTEGER NOT NULL,