From 8eecf1a981bb17c223236cbdb241dbf818c28e19 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Sat, 9 Sep 2023 22:52:51 +0200 Subject: [PATCH] Drop column funding --- init.sql | 1 - src/market.go | 1 - src/router.go | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/init.sql b/init.sql index 4fd0715..814133e 100644 --- a/init.sql +++ b/init.sql @@ -16,7 +16,6 @@ CREATE TABLE sessions( CREATE TABLE markets( id SERIAL PRIMARY KEY, description TEXT NOT NULL, - funding BIGINT NOT NULL, active BOOLEAN DEFAULT true ); CREATE EXTENSION "uuid-ossp"; diff --git a/src/market.go b/src/market.go index 99461e0..6aee60a 100644 --- a/src/market.go +++ b/src/market.go @@ -13,7 +13,6 @@ import ( type Market struct { Id int Description string - Funding int Active bool } diff --git a/src/router.go b/src/router.go index 4fd5e6e..23cfa26 100644 --- a/src/router.go +++ b/src/router.go @@ -34,7 +34,7 @@ func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Con } func index(c echo.Context) error { - rows, err := db.Query("SELECT id, description, funding, active FROM markets WHERE active = true") + rows, err := db.Query("SELECT id, description, active FROM markets WHERE active = true") if err != nil { return err } @@ -42,7 +42,7 @@ func index(c echo.Context) error { var markets []Market for rows.Next() { var market Market - rows.Scan(&market.Id, &market.Description, &market.Funding, &market.Active) + rows.Scan(&market.Id, &market.Description, &market.Active) markets = append(markets, market) } data := map[string]any{