Increase length of City field MDL-19629 - Taumata­whakatangihanga­koauau­o­tamatea­turi­pukakapiki­maunga­horo­nuku­pokai­whenua­kitanatahu doesn't actually fit in 100 chars - we need 105 - increasing further to 120

This commit is contained in:
Dan Marsden 2010-07-08 11:15:49 +00:00
parent 07b21d0467
commit c5c0d2ff98
6 changed files with 9 additions and 9 deletions

View file

@ -727,7 +727,7 @@
<FIELD NAME="institution" TYPE="char" LENGTH="40" NOTNULL="true" SEQUENCE="false" PREVIOUS="phone2" NEXT="department"/> <FIELD NAME="institution" TYPE="char" LENGTH="40" NOTNULL="true" SEQUENCE="false" PREVIOUS="phone2" NEXT="department"/>
<FIELD NAME="department" TYPE="char" LENGTH="30" NOTNULL="true" SEQUENCE="false" PREVIOUS="institution" NEXT="address"/> <FIELD NAME="department" TYPE="char" LENGTH="30" NOTNULL="true" SEQUENCE="false" PREVIOUS="institution" NEXT="address"/>
<FIELD NAME="address" TYPE="char" LENGTH="70" NOTNULL="true" SEQUENCE="false" PREVIOUS="department" NEXT="city"/> <FIELD NAME="address" TYPE="char" LENGTH="70" NOTNULL="true" SEQUENCE="false" PREVIOUS="department" NEXT="city"/>
<FIELD NAME="city" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" PREVIOUS="address" NEXT="country"/> <FIELD NAME="city" TYPE="char" LENGTH="120" NOTNULL="true" SEQUENCE="false" PREVIOUS="address" NEXT="country"/>
<FIELD NAME="country" TYPE="char" LENGTH="2" NOTNULL="true" SEQUENCE="false" PREVIOUS="city" NEXT="lang"/> <FIELD NAME="country" TYPE="char" LENGTH="2" NOTNULL="true" SEQUENCE="false" PREVIOUS="city" NEXT="lang"/>
<FIELD NAME="lang" TYPE="char" LENGTH="30" NOTNULL="true" DEFAULT="en" SEQUENCE="false" PREVIOUS="country" NEXT="theme"/> <FIELD NAME="lang" TYPE="char" LENGTH="30" NOTNULL="true" DEFAULT="en" SEQUENCE="false" PREVIOUS="country" NEXT="theme"/>
<FIELD NAME="theme" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" PREVIOUS="lang" NEXT="timezone"/> <FIELD NAME="theme" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" PREVIOUS="lang" NEXT="timezone"/>

View file

@ -4687,7 +4687,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
upgrade_main_savepoint(true, 2010070604); upgrade_main_savepoint(true, 2010070604);
} }
if ($oldversion < 2010070701) { if ($oldversion < 2010070801) {
/// Before changing the field, drop dependent indexes /// Before changing the field, drop dependent indexes
/// Define index shortname (not unique) to be dropped form course_request /// Define index shortname (not unique) to be dropped form course_request
$table = new xmldb_table('user'); $table = new xmldb_table('user');
@ -4696,8 +4696,8 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
if ($dbman->index_exists($table, $index)) { if ($dbman->index_exists($table, $index)) {
$dbman->drop_index($table, $index); $dbman->drop_index($table, $index);
} }
/// Changing precision of field city on table user to (100) /// Changing precision of field city on table user to (120)
$field = new xmldb_field('city', XMLDB_TYPE_CHAR, '100', null, XMLDB_NOTNULL, null, null, 'address'); $field = new xmldb_field('city', XMLDB_TYPE_CHAR, '120', null, XMLDB_NOTNULL, null, null, 'address');
/// Launch change of precision for field city /// Launch change of precision for field city
$dbman->change_field_precision($table, $field); $dbman->change_field_precision($table, $field);
@ -4707,7 +4707,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
$dbman->add_index($table, $index); $dbman->add_index($table, $index);
} }
/// Main savepoint reached /// Main savepoint reached
upgrade_main_savepoint(true, 2010070701); upgrade_main_savepoint(true, 2010070801);
} }
return true; return true;

View file

@ -3391,7 +3391,7 @@ function truncate_userinfo($info) {
'institution' => 40, 'institution' => 40,
'department' => 30, 'department' => 30,
'address' => 70, 'address' => 70,
'city' => 100, 'city' => 120,
'country' => 2, 'country' => 2,
'url' => 255, 'url' => 255,
); );

View file

@ -54,7 +54,7 @@ class login_signup_form extends moodleform {
$mform->setType('lastname', PARAM_TEXT); $mform->setType('lastname', PARAM_TEXT);
$mform->addRule('lastname', get_string('missinglastname'), 'required', null, 'server'); $mform->addRule('lastname', get_string('missinglastname'), 'required', null, 'server');
$mform->addElement('text', 'city', get_string('city'), 'maxlength="100" size="20"'); $mform->addElement('text', 'city', get_string('city'), 'maxlength="120" size="20"');
$mform->setType('city', PARAM_TEXT); $mform->setType('city', PARAM_TEXT);
$mform->addRule('city', get_string('missingcity'), 'required', null, 'server'); $mform->addRule('city', get_string('missingcity'), 'required', null, 'server');

View file

@ -187,7 +187,7 @@ function useredit_shared_definition(&$mform, $editoroptions = null) {
$mform->setDefault('screenreader', 0); $mform->setDefault('screenreader', 0);
$mform->addHelpButton('screenreader', 'screenreaderuse'); $mform->addHelpButton('screenreader', 'screenreaderuse');
$mform->addElement('text', 'city', get_string('city'), 'maxlength="100" size="21"'); $mform->addElement('text', 'city', get_string('city'), 'maxlength="120" size="21"');
$mform->setType('city', PARAM_MULTILANG); $mform->setType('city', PARAM_MULTILANG);
$mform->addRule('city', $strrequired, 'required', null, 'client'); $mform->addRule('city', $strrequired, 'required', null, 'client');

View file

@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine // This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php) // whether upgrades should be performed (see lib/db/*.php)
$version = 2010070800; // YYYYMMDD = date of the last version bump $version = 2010070801; // YYYYMMDD = date of the last version bump
// XX = daily increments // XX = daily increments
$release = '2.0 Preview 4+ (Build: 20100708)'; // Human-friendly version name $release = '2.0 Preview 4+ (Build: 20100708)'; // Human-friendly version name