diff --git a/migrations/2024_04_14_000000_add_meta_search_columns.php b/migrations/2024_04_14_000000_add_meta_search_columns.php index 0263546..bf64bea 100644 --- a/migrations/2024_04_14_000000_add_meta_search_columns.php +++ b/migrations/2024_04_14_000000_add_meta_search_columns.php @@ -25,12 +25,12 @@ public function up() if ($stringIndexLength > 0 && $driver = $this->detectDriverName()) { if (in_array($driver, ['mysql', 'mariadb'])) { $table->rawIndex( - "metable_type, key, value($stringIndexLength)", + "`metable_type`, `key`, `value`($stringIndexLength)", 'value_string_prefix_index' ); } elseif (in_array($driver, ['pgsql', 'sqlite'])) { $table->rawIndex( - "metable_type, key, SUBSTR(value, 1, $stringIndexLength)", + "`metable_type`, `key`, SUBSTR(`value`, 1, $stringIndexLength)", 'value_string_prefix_index' ); }