From bf5120a2a9265f7c602d636cbd16f265d4cc56f8 Mon Sep 17 00:00:00 2001 From: oesi Date: Thu, 2 Feb 2017 13:58:13 +0100 Subject: [PATCH] =?UTF-8?q?Datenbank=20Index=20f=C3=BCr=20tbl=5Fprestudent?= =?UTF-8?q?=20und=20prestudentstatus=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/dbupdate_3.2.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/system/dbupdate_3.2.php b/system/dbupdate_3.2.php index 3140c0700..bb53f0839 100755 --- a/system/dbupdate_3.2.php +++ b/system/dbupdate_3.2.php @@ -1483,6 +1483,25 @@ if($result = $db->db_query("SELECT data_type FROM information_schema.columns WHE } } +// Index fuer prestudent und prestudentstatus +if($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_prestudent_person'")) +{ + if($db->db_num_rows($result)==0) + { + + $qry = " + CREATE INDEX idx_prestudent_person ON public.tbl_prestudent USING btree (person_id); + CREATE INDEX idx_prestudentstatus_prestudent ON public.tbl_prestudentstatus USING btree (prestudent_id); + "; + + if(!$db->db_query($qry)) + echo 'Indizes: '.$db->db_last_error().'
'; + else + echo 'Diverse Indizes fuer Prestudent und Prestudentstatus hinzugefuegt'; + } +} + + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

';