Skip to content

Commit c544a64

Browse files
committed
fix(issue-2): prevent db error after installation
1 parent 4ea6421 commit c544a64

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/SwaggerServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ public function boot(): void {
4848

4949
$this->loadValidationRules();
5050

51-
DB::getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
51+
try {
52+
DB::getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
53+
} catch (\Exception $e) {
54+
error_log('Could not register enum type as string because of connexion error.');
55+
}
5256

5357
if (file_exists($file = __DIR__ . '/helpers.php')) {
5458
require $file;

0 commit comments

Comments
 (0)