From dc494a3d4539f52d388366e041fbe209ed5b32c9 Mon Sep 17 00:00:00 2001 From: oesi Date: Thu, 2 Feb 2017 13:47:02 +0100 Subject: [PATCH] =?UTF-8?q?Datentyp=20der=20Spalte=20nummer=20in=20campus.?= =?UTF-8?q?tbl=5Fbeispiel=20von=20smallint=20auf=20integer=20ge=C3=A4ndert?= =?UTF-8?q?=20da=20es=20sonst=20zu=20einem=20=C3=9Cberlauf=20kommt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/dbupdate_3.2.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/system/dbupdate_3.2.php b/system/dbupdate_3.2.php index bcdf244b8..3140c0700 100755 --- a/system/dbupdate_3.2.php +++ b/system/dbupdate_3.2.php @@ -1466,6 +1466,23 @@ if($result = $db->db_query("SELECT character_maximum_length FROM information_sch } } +// Nummer in campus.tbl_beispiel von smallint auf integer aendern +if($result = $db->db_query("SELECT data_type FROM information_schema.columns WHERE column_name='nummer' AND table_name='tbl_beispiel' AND table_schema='campus';")) +{ + if($row = $db->db_fetch_object($result)) + { + if($row->data_type=='smallint') + { + $qry = "ALTER TABLE campus.tbl_beispiel ALTER COLUMN nummer TYPE integer;"; + + if(!$db->db_query($qry)) + echo 'campus.tbl_beispiel: '.$db->db_last_error().'
'; + else + echo 'campus.tbl_beispiel: Spalte nummer von smallint auf integer geƤndert
'; + } + } +} + // *** Pruefung und hinzufuegen der neuen Attribute und Tabellen echo '

Pruefe Tabellen und Attribute!

';