MDL-14957 get_columns() improvements

This commit is contained in:
skodak 2008-05-25 23:17:21 +00:00
parent e108cea45f
commit 72e949b8ce

View File

@ -80,7 +80,7 @@ class database_column_info {
public $default_value;
/**
* True if field values unique
* True if field values unique, false if not
*/
public $unique;
@ -108,5 +108,17 @@ class database_column_info {
$this->$key = $value;
}
}
switch ($this->meta_type) {
case 'R': // normalise counters (usually 'id')
$this->auto_increment = true;
$this->binary = false;
$this->has_default = false;
$this->default_value = null;
$this->unique = true;
case 'C':
$this->auto_increment = false;
$this->binary = false;
}
}
}