Skip to content

Commit

Permalink
Possibly expensive SQL Query on determining files to process #144
Browse files Browse the repository at this point in the history
Fix cast for MySQL
  • Loading branch information
Philip Stadermann committed Oct 18, 2024
1 parent e266783 commit 7d8ae58
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Db/DbFileMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ public function getFileIdsWithTags(array $includedTagIds, int $limit, int $offse
*/
private function getStringTypeDeclarationSQL(): string {
$platform = $this->db->getDatabaseProvider();
if ($platform === 'mysql' || $platform === 'sqlite' || $platform === 'postgres') {
if ($platform === "mysql") {
$stringType = 'CHAR(64)';
}
else if ($platform === 'sqlite' || $platform === 'postgres') {
$stringType = 'VARCHAR(64)';
} else {
throw new Exception('Unsupported database platform: ' . $platform);
Expand Down

0 comments on commit 7d8ae58

Please sign in to comment.