From 3dfa73ec74ec13bc9fc1ff41d776f7964b385820 Mon Sep 17 00:00:00 2001 From: Mark Chadwick Date: Fri, 22 Nov 2024 23:37:44 +1300 Subject: [PATCH] update --- meta/sqlite/rework.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/meta/sqlite/rework.go b/meta/sqlite/rework.go index b22212fe8..8ff0efc33 100644 --- a/meta/sqlite/rework.go +++ b/meta/sqlite/rework.go @@ -1006,13 +1006,13 @@ CREATE TABLE IF NOT EXISTS sensor ( asset_id INTEGER NOT NULL, site_id INTEGER NOT NULL, method_id INTEGER NOT NULL, - azimuth REAL NOT NULL, - dip REAL NOT NULL, - depth REAL NOT NULL, - north REAL NOT NULL, - east REAL NOT NULL, - scale_factor REAL NOT NULL, - scale_bias REAL NOT NULL, + azimuth REAL NOT NULL ON CONFLICT REPLACE DEFAULT 0.0, + dip REAL NOT NULL ON CONFLICT REPLACE DEFAULT 0.0, + depth REAL NOT NULL ON CONFLICT REPLACE DEFAULT 0.0, + north REAL NOT NULL ON CONFLICT REPLACE DEFAULT 0.0, + east REAL NOT NULL ON CONFLICT REPLACE DEFAULT 0.0, + scale_factor REAL NOT NULL ON CONFLICT REPLACE DEFAULT 1.0, + scale_bias REAL NOT NULL ON CONFLICT REPLACE DEFAULT 0.0, start_date DATETIME NOT NULL CHECK (start_date IS strftime('%Y-%m-%dT%H:%M:%SZ', start_date)), end_date DATETIME NOT NULL CHECK (end_date IS strftime('%Y-%m-%dT%H:%M:%SZ', end_date)), FOREIGN KEY (asset_id) REFERENCES asset (asset_id), @@ -1050,9 +1050,9 @@ CREATE TABLE IF NOT EXISTS recorder ( model_id INTEGER NOT NULL, site_id INTEGER NOT NULL, method_id INTEGER NOT NULL, - azimuth REAL NOT NULL, - dip REAL NOT NULL, - depth REAL NOT NULL, + azimuth REAL NOT NULL ON CONFLICT REPLACE DEFAULT 0.0, + dip REAL NOT NULL ON CONFLICT REPLACE DEFAULT 0.0, + depth REAL NOT NULL ON CONFLICT REPLACE DEFAULT 0.0, start_date DATETIME NOT NULL CHECK (start_date IS strftime('%Y-%m-%dT%H:%M:%SZ', start_date)), end_date DATETIME NOT NULL CHECK (end_date IS strftime('%Y-%m-%dT%H:%M:%SZ', end_date)), FOREIGN KEY (asset_id) REFERENCES asset (asset_id),