mirror of
https://github.com/moodle/moodle.git
synced 2025-07-12 18:06:41 +02:00
MDL-29313 enforce varchar size limit
This commit is contained in:
@ -280,7 +280,7 @@ class postgres_sql_generator extends sql_generator {
|
||||
$results[] = 'ALTER TABLE ' . $tablename . ' ALTER COLUMN ' . $fieldname . ' DROP DEFAULT'; /// Drop default clause
|
||||
}
|
||||
$alterstmt = 'ALTER TABLE ' . $tablename . ' ALTER COLUMN ' . $this->getEncQuoted($xmldb_field->getName()) .
|
||||
' TYPE' . $this->getFieldSQL($xmldb_field, null, true, true, null, false);
|
||||
' TYPE' . $this->getFieldSQL($xmldb_table, $xmldb_field, null, true, true, null, false);
|
||||
/// Some castings must be performed explicity (mainly from text|char to numeric|integer)
|
||||
if (($oldmetatype == 'C' || $oldmetatype == 'X') &&
|
||||
($xmldb_field->getType() == XMLDB_TYPE_NUMBER || $xmldb_field->getType() == XMLDB_TYPE_FLOAT)) {
|
||||
|
Reference in New Issue
Block a user