Skip to content

Commit 5ea5c4b

Browse files
committed
fix mysql 5.7
1 parent 87aecd8 commit 5ea5c4b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

database/migrations_v1/2018_11_06_222923_create_transactions_table.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public function json(Blueprint $table, string $column): ColumnDefinition
4444
$pdo = $conn->getPdo();
4545
try {
4646
$sql = 'SELECT JSON_EXTRACT(\'[10, 20, [30, 40]]\', \'$[1]\');';
47-
$pdo->exec($sql);
47+
$prepare = $pdo->prepare($sql);
48+
$prepare->fetch();
4849
} catch (\Throwable $throwable) {
4950
return $table->text($column);
5051
}

0 commit comments

Comments
 (0)