Permalink
Browse files

MDL-34475 add default value to xmldb_field hash calculation

  • Loading branch information...
1 parent 9592f5d commit e2ecc7c6cc5066e6ecfe97f8cb55cd10c5799611 @skodak skodak committed Jul 23, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/xmldb/xmldb_field.php
@@ -493,9 +493,10 @@ public function calculateHash($recursive = false) {
if (!$this->loaded) {
$this->hash = null;
} else {
+ $defaulthash = is_null($this->default) ? '' : sha1($this->default);
$key = $this->name . $this->type . $this->length .
$this->notnull . $this->sequence .
- $this->decimals . $this->comment;
+ $this->decimals . $this->comment . $defaulthash;
$this->hash = md5($key);
}
}

0 comments on commit e2ecc7c

Please sign in to comment.