From c8e9e43b6507def369c0790d087de8c6f0d1b34f Mon Sep 17 00:00:00 2001 From: Mark Chadwick Date: Fri, 22 Nov 2024 23:20:56 +1300 Subject: [PATCH] update --- meta/sqlite/db.go | 1 - meta/sqlite/rework.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/meta/sqlite/db.go b/meta/sqlite/db.go index 689cc3bfe..3bcfa644f 100644 --- a/meta/sqlite/db.go +++ b/meta/sqlite/db.go @@ -358,7 +358,6 @@ func (d DB) Init(ctx context.Context, list []meta.TableList) error { if err := d.exec(ctx, tx, gain.Create); err != nil { return err } - log.Println(gain.Insert) if err := d.prepare(ctx, tx, gain.Insert, gain.Columns(l)...); err != nil { return err } diff --git a/meta/sqlite/rework.go b/meta/sqlite/rework.go index a197a20db..9df367a04 100644 --- a/meta/sqlite/rework.go +++ b/meta/sqlite/rework.go @@ -720,7 +720,6 @@ CREATE TABLE IF NOT EXISTS gain ( FOREIGN KEY (site_id) REFERENCES site (site_id), UNIQUE(site_id, sublocation, subsource, start_date, end_date) ); - CREATE TRIGGER IF NOT EXISTS no_overlap_on_gain BEFORE INSERT ON gain WHEN EXISTS ( SELECT * FROM gain @@ -737,7 +736,8 @@ END; ` func gainInsert() string { - return fmt.Sprintf("INSERT OR IGNORE INTO gain (site_id, sublocation, subsource, scale_factor, scale_bias, absolute_bias, start_date, end_date) VALUES ((%s), ?, ?, ?, ?, ?, ?, ?);", siteSelect()) + //return fmt.Sprintf("INSERT OR IGNORE INTO gain (site_id, sublocation, subsource, scale_factor, scale_bias, absolute_bias, start_date, end_date) VALUES ((%s), ?, ?, ?, ?, ?, ?, ?);", siteSelect()) + return fmt.Sprintf("INSERT INTO gain (site_id, sublocation, subsource, scale_factor, scale_bias, absolute_bias, start_date, end_date) VALUES ((%s), ?, ?, ?, ?, ?, ?, ?);", siteSelect()) } func gainFields() []string {