mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
AMPELSYSTEM: new GUI with Sancho; new logic
. new GUI with Sancho and collapsable panel . new logic: 1. popup only for notifications that are: ---- mandatory ---- unconfirmed ---- not expired ---- not before vorlaufszeit 2. overall display for all notifications that are ---- not before vorlaufszeit -> confirmed and/or expired notifications are displayed serperately and only readable
This commit is contained in:
@@ -1265,6 +1265,34 @@ if($result = $db->db_query("SELECT 1 FROM system.tbl_app WHERE app='bewerbung'")
|
||||
}
|
||||
}
|
||||
|
||||
// Remove NOT NULL constraint on vorlaufszeit on public.tbl_ampel
|
||||
if($result = @$db->db_query("SELECT is_nullable FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'public' AND TABLE_NAME = 'tbl_ampel' AND COLUMN_NAME = 'vorlaufzeit' AND is_nullable = 'NO'"))
|
||||
{
|
||||
if($db->db_num_rows($result) > 0)
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_ampel ALTER COLUMN vorlaufzeit DROP NOT NULL;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_ampel '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Removed NOT NULL constraint on "vorlaufszeit" from public.tbl_ampel<br>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Remove NOT NULL constraint on verfallszeit on public.tbl_ampel
|
||||
if($result = @$db->db_query("SELECT is_nullable FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'public' AND TABLE_NAME = 'tbl_ampel' AND COLUMN_NAME = 'verfallszeit' AND is_nullable = 'NO'"))
|
||||
{
|
||||
if($db->db_num_rows($result) > 0 )
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_ampel ALTER COLUMN verfallszeit DROP NOT NULL;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_ampel '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Removed NOT NULL constraint on "verfallszeit" from public.tbl_ampel<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
|
||||
Reference in New Issue
Block a user