Merge branch 'feature-17391/Kostenstellennummer_6_Zeichen_BFI'

This commit is contained in:
Andreas Österreicher
2022-02-16 18:39:08 +01:00
+14
View File
@@ -5941,6 +5941,20 @@ if ($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_tbl_zeita
}
}
// Change size of wawi.tbl_kostenstelle.kostenstelle_nr from character varying(4) to character varying(6)
if ($result = $db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='wawi' AND TABLE_NAME='tbl_kostenstelle' AND COLUMN_NAME = 'kostenstelle_nr' AND character_maximum_length < 6"))
{
if ($db->db_num_rows($result) > 0)
{
$qry = "ALTER TABLE wawi.tbl_kostenstelle ALTER COLUMN kostenstelle_nr TYPE varchar(6);";
if(!$db->db_query($qry))
echo '<strong>wawi.tbl_kostenstelle '.$db->db_last_error().'</strong><br>';
else
echo '<br>Spalte kostenstelle_nr in wawi.tbl_kostenstelle von varchar(4) auf varchar(6) geändert<br>';
}
}
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';