From 55362ad3c60d127a711da614d1796edcbbe91590 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Fri, 3 Oct 2025 17:08:09 +0000 Subject: [PATCH] Index ROLES --- db/schemas/sokwedb/indexes/Makefile | 2 +- db/schemas/sokwedb/indexes/create/roles.m4 | 30 ++++++++++++++++++++++ db/schemas/sokwedb/indexes/drop/roles.m4 | 28 ++++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 db/schemas/sokwedb/indexes/create/roles.m4 create mode 100644 db/schemas/sokwedb/indexes/drop/roles.m4 diff --git a/db/schemas/sokwedb/indexes/Makefile b/db/schemas/sokwedb/indexes/Makefile index 450fb4c..d4a320f 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 events + follows follow_observers follow_studies events roles ## ## CAUTION: This Makefile is not designed to be run directly. It is normally diff --git a/db/schemas/sokwedb/indexes/create/roles.m4 b/db/schemas/sokwedb/indexes/create/roles.m4 new file mode 100644 index 0000000..a0335e8 --- /dev/null +++ b/db/schemas/sokwedb/indexes/create/roles.m4 @@ -0,0 +1,30 @@ +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 roles_eid ON roles + (eid); +CREATE INDEX IF NOT EXISTS roles_role ON roles + (role); +CREATE INDEX IF NOT EXISTS roles_participant ON roles + (participant); + diff --git a/db/schemas/sokwedb/indexes/drop/roles.m4 b/db/schemas/sokwedb/indexes/drop/roles.m4 new file mode 100644 index 0000000..5429d10 --- /dev/null +++ b/db/schemas/sokwedb/indexes/drop/roles.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 roles_eid; +DROP INDEX IF EXISTS roles_role; +DROP INDEX IF EXISTS roles_participant; + -- 2.34.1