From 327487504466648dd4e5e1d3850c05a43d623869 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Thu, 2 Oct 2025 23:21:24 +0000 Subject: [PATCH] Make COMM_MEMBS_SOURCES.CommMembSource unique when ignoring case --- .../indexes/create/comm_membs_sources.m4 | 26 +++++++++++++++++++ .../codes/indexes/drop/comm_membs_sources.m4 | 24 +++++++++++++++++ doc/src/code_tables.m4 | 2 +- 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 db/schemas/codes/indexes/create/comm_membs_sources.m4 create mode 100644 db/schemas/codes/indexes/drop/comm_membs_sources.m4 diff --git a/db/schemas/codes/indexes/create/comm_membs_sources.m4 b/db/schemas/codes/indexes/create/comm_membs_sources.m4 new file mode 100644 index 0000000..1be091b --- /dev/null +++ b/db/schemas/codes/indexes/create/comm_membs_sources.m4 @@ -0,0 +1,26 @@ +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 UNIQUE INDEX IF NOT EXISTS + comm_membs_sources_comm_membs_source_uniquenocase ON comm_membs_sources + (sdb_case_equivalence(commmembssource)); diff --git a/db/schemas/codes/indexes/drop/comm_membs_sources.m4 b/db/schemas/codes/indexes/drop/comm_membs_sources.m4 new file mode 100644 index 0000000..81dfb12 --- /dev/null +++ b/db/schemas/codes/indexes/drop/comm_membs_sources.m4 @@ -0,0 +1,24 @@ +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(`macros.m4')dnl + +DROP INDEX IF EXISTS comm_membs_sources_comm_memb_source_uniquenocase; diff --git a/doc/src/code_tables.m4 b/doc/src/code_tables.m4 index c2e5870..6ab59fc 100644 --- a/doc/src/code_tables.m4 +++ b/doc/src/code_tables.m4 @@ -127,7 +127,7 @@ CommMembsSource A somewhat abbreviated description which identifies a data source from which community membership can be derived. -|COMM_MEMBS_SOURCES.CommMembsSource_summary| |keycol| +|COMM_MEMBS_SOURCES.CommMembsSource_summary| |caseuniquekeycol| .. _COMM_MEMBS_SOURCES.Description: -- 2.34.1