added column habilitation to tbl_mitarbeiter

This commit is contained in:
KarpAlex
2023-11-09 10:53:04 +01:00
parent fad475fb64
commit 3a8216577f
2 changed files with 31 additions and 0 deletions
@@ -0,0 +1,15 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
//Add column habilitation to public.tbl_mitarbeiter
if(!@$db->db_query("SELECT habilitation FROM public.tbl_mitarbeiter LIMIT 1"))
{
$qry = "ALTER TABLE public.tbl_mitarbeiter ADD COLUMN habilitation boolean NOT NULL DEFAULT false;
COMMENT ON COLUMN public.tbl_mitarbeiter.habilitation IS 'Zeigt an, ob Mitarbeiter habilitiert ist (BIS relevant).';
";
if(!$db->db_query($qry))
echo '<strong>public.tbl_mitarbeiter '.$db->db_last_error().'</strong><br>';
else
echo '<br>Spalte habilitation zu Tabelle public.tbl_mitarbeiter hinzugefügt';
}
@@ -0,0 +1,16 @@
<?php
if (! defined('DB_NAME')) exit('No direct script access allowed');
// system.tbl_app: add type mobilityonline
if($result = $db->db_query("SELECT 1 FROM system.tbl_app WHERE app='mobilityonline'"))
{
if($db->db_num_rows($result)==0)
{
$qry = "INSERT INTO system.tbl_app(app) VALUES('mobilityonline');";
if(!$db->db_query($qry))
echo '<strong>App: '.$db->db_last_error().'</strong><br>';
else
echo '<br>Neue App mobilityonline in system.tbl_app hinzugefügt';
}
}