From 81f7bf8f30ca2ffbd8d0f2e3ac7a3df634d5c913 Mon Sep 17 00:00:00 2001 From: clench Date: Mon, 1 Feb 2010 04:55:54 +0000 Subject: [PATCH] #18662817 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7264 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/db/DBFirebird.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/db/DBFirebird.class.php b/classes/db/DBFirebird.class.php index b3bbcf947..e483a624c 100644 --- a/classes/db/DBFirebird.class.php +++ b/classes/db/DBFirebird.class.php @@ -387,7 +387,7 @@ $query = sprintf("ALTER TABLE \"%s%s\" ADD \"%s\" ", $this->prefix, $table_name, $column_name); if($size) $query .= sprintf(" %s(%s) ", $type, $size); else $query .= sprintf(" %s ", $type); - if($default) $query .= sprintf(" DEFAULT '%s' ", $default); + if(!is_null($default)) $query .= sprintf(" DEFAULT '%s' ", $default); if($notnull) $query .= " NOT NULL "; $this->_query($query); @@ -551,7 +551,7 @@ $name, $this->column_type[$type], $size?'('.$size.')':'', - $default?"DEFAULT '".$default."'":"", + is_null($default)?"":"DEFAULT '".$default."'", $notnull?'NOT NULL':''); if($auto_increment) $auto_increment_list[] = $name;