diff --git a/database/migrations/2021_04_15_070732_achievements_progress.php b/database/migrations/2021_04_15_070732_achievements_progress.php index 65259a6..940645f 100644 --- a/database/migrations/2021_04_15_070732_achievements_progress.php +++ b/database/migrations/2021_04_15_070732_achievements_progress.php @@ -16,7 +16,7 @@ public function up() $table->integer('points')->default(0); $table->dateTime('unlocked_at')->nullable(); $table->timestamps(); - $table->index(['user_id', 'achievement_id']); + $table->unique(['user_id', 'achievement_id']); }); }