From 653a5e78d3f6feb64d2f09eac476b8d6757161e8 Mon Sep 17 00:00:00 2001 From: shrykedude Date: Sun, 18 Jan 2004 02:23:48 +0000 Subject: [PATCH] Avoid multiple NOT NULL parameters, as with MySQL auto_increment fields --- phpgwapi/inc/class.schema_proc.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.schema_proc.inc.php b/phpgwapi/inc/class.schema_proc.inc.php index dc2447b5d0..c3f4b5d3a8 100644 --- a/phpgwapi/inc/class.schema_proc.inc.php +++ b/phpgwapi/inc/class.schema_proc.inc.php @@ -413,7 +413,10 @@ { if(!$bNullable) { - $sFieldSQL .= ' NOT NULL'; + if(strpos(strtolower($sFieldSQL),' not null')===false) + { + $sFieldSQL .= ' NOT NULL'; + } } if(isset($aField['default']))