1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 13:44:12 +02:00

[ticket/17530] Use Doctrine driver middleware instead of 'platform' parameter

PHPBB-17530
This commit is contained in:
rxu
2025-07-14 00:38:54 +07:00
parent 8e8418a017
commit 980b6e6f9e
20 changed files with 284 additions and 371 deletions

View File

@@ -15,6 +15,8 @@ namespace phpbb\db\doctrine;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\Type;
use phpbb\db\middleware\postgresql\phpbb_postgresql_platform;
use phpbb\db\middleware\oracle\phpbb_oracle_platform;
/**
* Case-insensitive string type (only supported by Postgres).
@@ -28,7 +30,7 @@ class case_insensitive_string extends Type
*/
public function getSQLDeclaration(array $column, AbstractPlatform $platform): string
{
if ($platform instanceof postgresql_platform)
if ($platform instanceof phpbb_postgresql_platform)
{
return 'varchar_ci';
}
@@ -37,7 +39,7 @@ class case_insensitive_string extends Type
// we used 3 times larger capacity for strings on oracle for unicode strings
// as on other platforms. This is not the case with varchar_ci, which uses
// the same length as other platforms.
if ($platform instanceof oracle_platform)
if ($platform instanceof phpbb_oracle_platform)
{
return $platform->getAsciiStringTypeDeclarationSQL($column);
}