Skip to content

Commit 1360f0f

Browse files
zepichmichaelgracious
authored andcommitted
Replaced the hardcoded data types for compatibility with other database platforms
1 parent 3b98581 commit 1360f0f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Type/Encrypted.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Encrypted extends Type
2020
*/
2121
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string
2222
{
23-
return 'TEXT COMMENT \'(DC2Type:encrypted)\'';
23+
return $platform->getClobTypeDeclarationSQL($fieldDeclaration);
2424
}
2525

2626
/**

Type/EncryptedArrayCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class EncryptedArrayCollection extends Type
2121
*/
2222
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string
2323
{
24-
return 'LONGTEXT COMMENT \'(DC2Type:encryptedArrayCollection)\'';
24+
return $platform->getClobTypeDeclarationSQL($fieldDeclaration);
2525
}
2626

2727
/**

Type/Hashed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Hashed extends Type
2020
*/
2121
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string
2222
{
23-
return 'VARCHAR(255) COMMENT \'(DC2Type:hashed)\'';
23+
return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
2424
}
2525

2626
/**

0 commit comments

Comments
 (0)