From 9e0d88fd69bb8acf908ee7d8810a3ed17b7c83cc Mon Sep 17 00:00:00 2001 From: shrykedude Date: Sun, 25 Jan 2004 06:40:59 +0000 Subject: [PATCH] fix for changing non-nullable fields in postgres --- phpgwapi/inc/class.schema_proc_pgsql.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.schema_proc_pgsql.inc.php b/phpgwapi/inc/class.schema_proc_pgsql.inc.php index 259bd6f495..0f83154b60 100644 --- a/phpgwapi/inc/class.schema_proc_pgsql.inc.php +++ b/phpgwapi/inc/class.schema_proc_pgsql.inc.php @@ -410,7 +410,14 @@ } else { - $sSQL .= 'null'; + if(isset($arraydef['nullable']) && $arraydef['nullable']) + { + $sSQL .= 'null'; + } + else + { + $sSQL .= "''"; + } } $i++; }