Fix tests

This commit is contained in:
ekzyis 2024-07-09 12:33:56 +02:00
parent 5b8cd27536
commit f280898582
2 changed files with 3 additions and 2 deletions

View File

@ -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
)

View File

@ -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),