diff --git a/database/migrations/2022_02_08_010323_create_labels_assigned_table.php b/database/migrations/2022_02_08_010323_create_labels_assigned_table.php index fc33240..e332741 100644 --- a/database/migrations/2022_02_08_010323_create_labels_assigned_table.php +++ b/database/migrations/2022_02_08_010323_create_labels_assigned_table.php @@ -14,8 +14,9 @@ class CreateLabelsAssignedTable extends Migration public function up() { Schema::create('labels_assigned', function (Blueprint $table) { - $table->char('label_id', 8)->unique(); - $table->char('service_id', 8)->unique(); + $table->char('label_id', 8); + $table->char('service_id', 8); + $table->unique(['label_id','service_id'], 'uni'); }); }