Skip to content

Commit

Permalink
fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
frasmage committed May 16, 2024
1 parent 4fc5d9d commit 3981931
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions migrations/2024_04_14_000000_add_meta_search_columns.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function up()
$grammar = $connection->getQueryGrammar();
if (in_array($driver, ['mysql', 'mariadb'])) {
$table->rawIndex(
sprintf("%s, %s, %s(%d)",
sprintf(
"%s, %s, %s(%d)",
$grammar->wrap('metable_type'),
$grammar->wrap('key'),
$grammar->wrap('value'),
Expand All @@ -38,7 +39,8 @@ public function up()
);
} elseif (in_array($driver, ['pgsql', 'sqlite'])) {
$table->rawIndex(
sprintf("%s, %s, SUBSTR(%s, 1, %d)",
sprintf(
"%s, %s, SUBSTR(%s, 1, %d)",
$grammar->wrap('metable_type'),
$grammar->wrap('key'),
$grammar->wrap('value'),
Expand All @@ -61,7 +63,8 @@ public function down()
Schema::table('meta', function (Blueprint $table) {
$stringIndexLength = (int)config('metable.stringValueIndexLength', 255);
if ($stringIndexLength > 0
&& in_array($this->detectConnectionInUse()?->getDriverName(),
&& in_array(
$this->detectConnectionInUse()?->getDriverName(),
['mysql', 'mariadb', 'pgsql', 'sqlite']
)
) {
Expand Down

0 comments on commit 3981931

Please sign in to comment.