From dd54aab638e393a6c0128d9d9ac040769048af6f Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Wed, 13 May 2026 16:50:21 +0000 Subject: [PATCH] Create SIGHTINGS table Somehow, the file that defines the table was empty. This fixes the error that prevents comments from loading into the db when the db is (re)created. --- db/schemas/sokwedb/tables/create/sightings.m4 | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/db/schemas/sokwedb/tables/create/sightings.m4 b/db/schemas/sokwedb/tables/create/sightings.m4 index e69de29..a7089d2 100644 --- a/db/schemas/sokwedb/tables/create/sightings.m4 +++ b/db/schemas/sokwedb/tables/create/sightings.m4 @@ -0,0 +1,38 @@ +dnl Copyright (C) 2026 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU Affero General Public License as published +dnl by the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Karl O. Pinc +dnl +dnl +dnl m4 includes +include(`copyright.m4')dnl +include(`constants.m4')dnl +include(`tablemacros.m4')dnl +include(`grants.m4')dnl +dnl + +CREATE TABLE sightings ( + key_column(`SIGHTINGS', `SightID', INTEGER) + ,date DATE NOT NULL + ,animid_column + ,commid TEXT NOT NULL + CONSTRAINT "CommID must be a COMM_IDS.CommID value" + REFERENCES comm_ids + ,source TEXT NOT NULL + CONSTRAINT "Source must be a SIGHTINGS_RECORDS.Code value" + REFERENCES sighting_records (code) +); + +grant_priv(`SIGHTINGS') -- 2.34.1