From e47fdef2a84e8225522123082f868d65f65f92fe Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Sun, 7 Sep 2025 17:25:39 +0000 Subject: [PATCH] Add FOLLOW_OBSERVERS table --- db/schemas/sokwedb/tables/Makefile | 3 +- .../sokwedb/tables/create/follow_observers.m4 | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 db/schemas/sokwedb/tables/create/follow_observers.m4 diff --git a/db/schemas/sokwedb/tables/Makefile b/db/schemas/sokwedb/tables/Makefile index 4fdae3a..47b90df 100644 --- a/db/schemas/sokwedb/tables/Makefile +++ b/db/schemas/sokwedb/tables/Makefile @@ -25,7 +25,8 @@ ORDER := biography_data \ comm_membs \ comm_memb_log \ sightings \ - follows + follows \ + follow_observers ## ## CAUTION: This Makefile is not designed to be run directly. It is normally diff --git a/db/schemas/sokwedb/tables/create/follow_observers.m4 b/db/schemas/sokwedb/tables/create/follow_observers.m4 new file mode 100644 index 0000000..a7b4738 --- /dev/null +++ b/db/schemas/sokwedb/tables/create/follow_observers.m4 @@ -0,0 +1,38 @@ +dnl Copyright (C) 2025 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 follow_observers ( + key_column(`FOLLOW_OBSERVERS', `FOID', INTEGER) + ,fid INTEGER NOT NULL + REFERENCES follows + ,period TEXT NOT NULL + REFERENCES obs_periods + ,obs_brec TEXT NOT NULL + REFERENCES people + ,obs_tiki TEXT NOT NULL + REFERENCES people +); + +grant_priv(`FOLLOW_OBSERVERS') -- 2.34.1