Prevent NOT NULL fields to have one DEFAULT NULL clause

This commit is contained in:
stronk7 2006-09-25 21:44:21 +00:00
parent a653016d94
commit 0db2d6bb98

View file

@ -440,7 +440,7 @@ class XMLDBgenerator {
/// never applying defaults to TEXT and BINARY fields
if ($this->drop_default_clause_required &&
$xmldb_field->getType() != XMLDB_TYPE_TEXT &&
$xmldb_field->getType() != XMLDB_TYPE_BINARY) {
$xmldb_field->getType() != XMLDB_TYPE_BINARY && !$xmldb_field->getNotNull()) {
$default = ' DEFAULT ' . $this->drop_default_clause;
}
}