From 430b99525db0be0bf39b6053038f76c4b241d06b Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Fri, 3 Oct 2025 16:52:00 +0000 Subject: [PATCH] Index EVENTS --- db/schemas/sokwedb/indexes/Makefile | 2 +- db/schemas/sokwedb/indexes/create/events.m4 | 31 +++++++++++++++++++++ db/schemas/sokwedb/indexes/drop/events.m4 | 28 +++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 db/schemas/sokwedb/indexes/create/events.m4 create mode 100644 db/schemas/sokwedb/indexes/drop/events.m4 diff --git a/db/schemas/sokwedb/indexes/Makefile b/db/schemas/sokwedb/indexes/Makefile index 7d273be..450fb4c 100644 --- a/db/schemas/sokwedb/indexes/Makefile +++ b/db/schemas/sokwedb/indexes/Makefile @@ -20,7 +20,7 @@ # This determines the order in which the indexes are put into the database. # This is not really important but is needed for other types of db objects. ORDER := biography_data biography_log comm_membs comm_memb_log \ - follows follow_observers follow_studies + follows follow_observers follow_studies events ## ## CAUTION: This Makefile is not designed to be run directly. It is normally diff --git a/db/schemas/sokwedb/indexes/create/events.m4 b/db/schemas/sokwedb/indexes/create/events.m4 new file mode 100644 index 0000000..887269e --- /dev/null +++ b/db/schemas/sokwedb/indexes/create/events.m4 @@ -0,0 +1,31 @@ +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(`indexmacros.m4')dnl + +CREATE INDEX IF NOT EXISTS events_fid ON events + (fid); +CREATE INDEX IF NOT EXISTS events_behavior ON events + (behavior); +CREATE INDEX IF NOT EXISTS events_start ON events + (start); +CREATE INDEX IF NOT EXISTS events_stop ON events + (stop); diff --git a/db/schemas/sokwedb/indexes/drop/events.m4 b/db/schemas/sokwedb/indexes/drop/events.m4 new file mode 100644 index 0000000..c038b9a --- /dev/null +++ b/db/schemas/sokwedb/indexes/drop/events.m4 @@ -0,0 +1,28 @@ +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(`indexmacros.m4')dnl + + +DROP INDEX IF EXISTS events_fid; +DROP INDEX IF EXISTS events_behavior; +DROP INDEX IF EXISTS events_start; +DROP INDEX IF EXISTS events_stop; -- 2.34.1