add column betrag to table hr.tbl_sachaufwand

This commit is contained in:
Harald Bamberger
2025-04-02 16:07:09 +02:00
parent 7345dd258d
commit a54f7531bf
2 changed files with 18 additions and 1 deletions
+17
View File
@@ -605,4 +605,21 @@ if ($result = $db->db_query("SELECT * FROM information_schema.columns WHERE colu
else
echo 'Spalte gehaltsbestandteil_bis wurde in hr.tbl_gehaltshistorie neu erstellt<br>';
}
}
if ($result = $db->db_query("SELECT * FROM information_schema.columns WHERE column_name='betrag' AND table_name='tbl_sachaufwand' AND table_schema='hr'"))
{
if ($db->db_num_rows($result) == 0)
{
$qry = "
ALTER TABLE
hr.tbl_sachaufwand
ADD COLUMN
betrag numeric(9,2)
";
if (! $db->db_query($qry))
echo '<strong>Vertraege: ' . $db->db_last_error() . '</strong><br>';
else
echo 'Spalte betrag wurde in hr.tbl_sachaufwand neu erstellt<br>';
}
}