Skip to content

Commit

Permalink
Merge pull request #16304 from Nibbler999/inet6
Browse files Browse the repository at this point in the history
Add support for INET6 column type
  • Loading branch information
MauricioFauth committed Aug 15, 2020
2 parents 18d9bff + 1aaa4a6 commit 5931d5a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libraries/classes/Types.php
Expand Up @@ -391,6 +391,11 @@ public function getTypeDescription($type)
'Stores and enables efficient access to data in JSON'
. ' (JavaScript Object Notation) documents'
);
case 'INET6':
return __('Intended for storage of IPv6 addresses, as well as IPv4 '
. 'addresses assuming conventional mapping of IPv4 addresses '
. 'into IPv6 addresses'
);
}

return '';
Expand Down Expand Up @@ -441,6 +446,7 @@ public function getTypeClass($type)
case 'LONGBLOB':
case 'ENUM':
case 'SET':
case 'INET6':
return 'CHAR';
case 'GEOMETRY':
case 'POINT':
Expand Down Expand Up @@ -778,6 +784,10 @@ public function getColumns(): array
$ret['JSON'] = ['JSON'];
}

if ($isMariaDB && $serverVersion >= 100500) {
array_push($ret[_pgettext('string types', 'String')], '-', 'INET6');
}

return $ret;
}

Expand Down

0 comments on commit 5931d5a

Please sign in to comment.