Skip to content

Commit

Permalink
Update create_unique_surveyhero_id_indices.php
Browse files Browse the repository at this point in the history
Fix bug with the by laravel generated index name being too long
  • Loading branch information
sten authored Apr 8, 2024
1 parent 818949e commit 265f2d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion database/migrations/create_unique_surveyhero_id_indices.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public function up()
});

Schema::table($tableNames['survey_question_responses']['name'], function (Blueprint $table) {
$table->unique(['survey_response_id', 'survey_question_id', 'survey_answer_id']);
$table->unique(['survey_response_id', 'survey_question_id', 'survey_answer_id'])

Check failure on line 30 in database/migrations/create_unique_surveyhero_id_indices.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to an undefined method Illuminate\Database\Schema\IndexDefinition::name().
->name('survey_question_responses_ternary_ids_idx'); //for some dbs the id name generated by laravel is too long
});
}
}

0 comments on commit 265f2d7

Please sign in to comment.