Commit 7608d257 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1893291: Adjusting the client_connections_intitution table



Removing the unsigned type so will match other 'id' columns and allow
foreign key connection to work on mysql 8

Change-Id: Iac2d8e0b23ff6d7f0d464b1d0b9217d19ccc7a1c
Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
parent 75b1acf1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1287,7 +1287,7 @@
        </TABLE>
        <TABLE NAME="client_connections_institution">
            <FIELDS>
                <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true"/>
                <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
                <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
                <FIELD NAME="plugintype" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"  COMMENT="Plugin type eg: notification"/>
                <FIELD NAME="pluginname" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"  COMMENT="Plugin type eg: log"/>
+12 −0
Original line number Diff line number Diff line
@@ -1858,6 +1858,18 @@ function xmldb_core_upgrade($oldversion=0) {

    if ($oldversion < 2020063000) {
        log_debug('create client_connections_config table to hold extra configuration information');
        $table = new XMLDBTable('client_connections_institution');
        if (table_exists($table)) {
            $field = new XMLDBField('id');
            $field->setAttributes(XMLDB_TYPE_INTEGER, 10, null, XMLDB_NOTNULL, XMLDB_SEQUENCE);
            change_field_unsigned($table, $field);
            if (!is_mysql()) {
                log_debug('Adding primary key index back after editing id column');
                $key = new XMLDBKey('primary');
                $key->setAttributes(XMLDB_KEY_PRIMARY, array('id'));
                add_key($table, $key);
            }
        }
        $table = new XMLDBTable('client_connections_config');
        if (!table_exists($table)) {
            $table->addFieldInfo('id', XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE);