Skip to content

Commit

Permalink
Define a safe collation for mysql tables. Fixes: #488
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Nov 18, 2023
1 parent c7af5e9 commit 28c9166
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public String initializeStorageMeta() {
"`key` varchar(255) NOT NULL, " +
"`value` varchar(255) DEFAULT NULL, " +
"PRIMARY KEY (`key`)" +
")";
") COLLATE 'utf8mb4_bin'";
}

@Override
Expand All @@ -190,7 +190,7 @@ public String initializeMap() {
"`map_id` VARCHAR(255) NOT NULL," +
"PRIMARY KEY (`id`)," +
"UNIQUE INDEX `map_id` (`map_id`)" +
");";
") COLLATE 'utf8mb4_bin';";
}

@Override
Expand All @@ -201,7 +201,7 @@ public String initializeMapTileCompression() {
"`compression` VARCHAR(255) NOT NULL," +
"PRIMARY KEY (`id`)," +
"UNIQUE INDEX `compression` (`compression`)" +
");";
") COLLATE 'utf8mb4_bin';";
}

@Override
Expand All @@ -213,7 +213,7 @@ public String initializeMapMeta() {
"`value` LONGBLOB NOT NULL," +
"PRIMARY KEY (`map`, `key`)," +
"CONSTRAINT `fk_bluemap_map_meta_map` FOREIGN KEY (`map`) REFERENCES `bluemap_map` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT" +
")";
") COLLATE 'utf8mb4_bin'";
}

@Override
Expand All @@ -230,7 +230,7 @@ public String initializeMapTile() {
"PRIMARY KEY (`map`, `lod`, `x`, `z`)," +
"CONSTRAINT `fk_bluemap_map_tile_map` FOREIGN KEY (`map`) REFERENCES `bluemap_map` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT," +
"CONSTRAINT `fk_bluemap_map_tile_compression` FOREIGN KEY (`compression`) REFERENCES `bluemap_map_tile_compression` (`id`) ON UPDATE RESTRICT ON DELETE RESTRICT" +
");";
") COLLATE 'utf8mb4_bin';";
}

@Override
Expand Down

0 comments on commit 28c9166

Please sign in to comment.