You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into an issue when upgrading from v8 to v9 when using a Mariadb database. I was getting Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '>"$.generated_conversions", media.updated_at = ? where (generated_conver...' at line 1 (SQL: update media set generated_conversions = custom_properties->"$.generated_conversions", media.updated_at = 2022-06-29 08:04:38 where (generated_conversions is null or generated_conversions = or JSON_TYPE(generated_conversions) = 'NULL') and JSON_LENGTH(custom_properties) > 0)`
when I added the AddGeneratedConversionsToMediaTable migration.
The solution in the end was to edit the migration file, line 31.
Change 'generated_conversions' => DB::raw('custom_properties->"$.generated_conversions")
To 'generated_conversions' => DB::raw('JSON_EXTRACT(custom_properties, "$.generated_conversions")')
Think this could possibly be added to the docs as anyone using a MariaDb database will run into this issue.
The text was updated successfully, but these errors were encountered:
I ran into an issue when upgrading from v8 to v9 when using a Mariadb database. I was getting
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '>"$.generated_conversions",
media.
updated_at= ? where (
generated_conver...' at line 1 (SQL: updatemedia
setgenerated_conversions
= custom_properties->"$.generated_conversions",media
.updated_at
= 2022-06-29 08:04:38 where (generated_conversions
is null orgenerated_conversions
= or JSON_TYPE(generated_conversions) = 'NULL') and JSON_LENGTH(custom_properties) > 0)`when I added the AddGeneratedConversionsToMediaTable migration.
The solution in the end was to edit the migration file, line 31.
Change
'generated_conversions' => DB::raw('custom_properties->"$.generated_conversions")
To
'generated_conversions' => DB::raw('JSON_EXTRACT(custom_properties, "$.generated_conversions")')
Think this could possibly be added to the docs as anyone using a MariaDb database will run into this issue.
The text was updated successfully, but these errors were encountered: