From 3ba24f8c0ec42feb65e002d7365a1474e4e0c12d Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Tue, 19 Nov 2024 10:44:54 -0500 Subject: [PATCH] Make not null --- pkg/database/models.go | 2 +- sql/postgres/migrations/001_initial.up.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/database/models.go b/pkg/database/models.go index f756897..657ae90 100644 --- a/pkg/database/models.go +++ b/pkg/database/models.go @@ -105,7 +105,7 @@ type TalkgroupsLearned struct { Name string `json:"name"` AlphaTag *string `json:"alpha_tag"` TGGroup *string `json:"tg_group"` - Ignored *bool `json:"ignored"` + Ignored bool `json:"ignored"` } type User struct { diff --git a/sql/postgres/migrations/001_initial.up.sql b/sql/postgres/migrations/001_initial.up.sql index 59aa9ec..c0e4a94 100644 --- a/sql/postgres/migrations/001_initial.up.sql +++ b/sql/postgres/migrations/001_initial.up.sql @@ -51,7 +51,7 @@ CREATE TABLE IF NOT EXISTS talkgroups_learned( name TEXT NOT NULL, alpha_tag TEXT, tg_group TEXT, - ignored BOOLEAN, + ignored BOOLEAN NOT NULL DEFAULT FALSE, UNIQUE (system_id, tgid, name) );