Skip to content

Commit

Permalink
Fix failsafe for db charset
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurpar06 committed Jul 10, 2024
1 parent 4064094 commit 18f7f9b
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ public function up()
->where('schema_name', config('database.connections.mysql.database'))
->first();

dd($query);

if ($query?->default_character_set_name === 'utf8mb4') {
if ((property_exists($query, 'default_character_set_name') && $query->default_character_set_name === 'utf8mb4') || (property_exists($query, 'DEFAULT_CHARACTER_SET_NAME') && $query->DEFAULT_CHARACTER_SET_NAME === 'utf8mb4')) {
return;
}

Expand Down

0 comments on commit 18f7f9b

Please sign in to comment.