Commit 23fc7497 authored by Nigel McNie's avatar Nigel McNie
Browse files

(#3097) Convert portno column to a size that will allow any port.

Converting to a bigint is way overkill, but I'mna blame XMLDB for that.
parent f3a475f2
......@@ -165,7 +165,7 @@
<FIELD NAME="name" TYPE="char" LENGTH="80" NOTNULL="true"/>
<FIELD NAME="institution" TYPE="char" LENGTH="255" NOTNULL="true"/>
<FIELD NAME="ipaddress" TYPE="char" LENGTH="39" NOTNULL="true"/>
<FIELD NAME="portno" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="80"/>
<FIELD NAME="portno" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="80"/>
<FIELD NAME="appname" TYPE="char" LENGTH="20" NOTNULL="true"/>
<FIELD NAME="publickey" TYPE="text" NOTNULL="true" DEFAULT=""/>
<FIELD NAME="publickeyexpires" TYPE="int" LENGTH="10" NOTNULL="true"/>
......
......@@ -1032,6 +1032,14 @@ function xmldb_core_upgrade($oldversion=0) {
delete_records_select('activity_queue', 'ctime < ?', array(db_format_timestamp(time() - (86400 * 14))));
}
if ($oldversion < 2008040217) {
// Make the "port" column larger so it can handle any port number
$table = new XMLDBTable('host');
$field = new XMLDBField('portno');
$field->setAttributes(XMLDB_TYPE_INTEGER, 10, null, XMLDB_NOTNULL, null, null, null, 80);
change_field_precision($table, $field);
}
return $status;
}
......
......@@ -27,7 +27,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2008040216;
$config->version = 2008040217;
$config->release = '1.0.9testing';
$config->minupgradefrom = 2007080700;
$config->minupgraderelease = '0.8.0 (release tag 0.8.0_RELEASE)';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment