mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-14957 get_columns() improvements
This commit is contained in:
parent
e108cea45f
commit
72e949b8ce
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user