Skip to content

Commit

Permalink
MDL-14957 get_columns() improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed May 25, 2008
1 parent e108cea commit 72e949b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/dml/database_column_info.php
Expand Up @@ -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;

Expand Down Expand Up @@ -108,5 +108,17 @@ public function __construct($data) {
$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;
}
}
}

0 comments on commit 72e949b

Please sign in to comment.