From f280898582ecc238a9c2c59ec3eeac08afae3e62 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Tue, 9 Jul 2024 12:33:56 +0200 Subject: [PATCH] Fix tests --- db/db.go | 2 +- db/init.sql | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/db/db.go b/db/db.go index 5f9c13e..31429ab 100644 --- a/db/db.go +++ b/db/db.go @@ -53,7 +53,7 @@ func (db *DB) Reset(dbName string) error { func (db *DB) Clear(dbName string) error { var ( - tables = []string{"lnauth", "users", "sessions", "markets", "shares", "invoices", "order_side", "orders", "matches"} + tables = []string{"lnauth", "users", "sessions", "invoices", "markets", "shares", "invoices", "order_side", "orders", "withdrawals"} sql []string err error ) diff --git a/db/init.sql b/db/init.sql index 10e1bc8..09a777f 100644 --- a/db/init.sql +++ b/db/init.sql @@ -1,3 +1,5 @@ +CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; + CREATE TABLE lnauth( k1 VARCHAR(64) NOT NULL PRIMARY KEY, lnurl TEXT NOT NULL, @@ -35,7 +37,6 @@ CREATE TABLE markets( pubkey TEXT NOT NULL REFERENCES users(pubkey), invoice_id UUID NOT NULL UNIQUE REFERENCES invoices(id) ); -CREATE EXTENSION "uuid-ossp"; CREATE TABLE shares( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), market_id INTEGER NOT NULL REFERENCES markets(id),