Updated labels_assigned migration for unique key index

Updated labels_assigned migration for unique key index
This commit is contained in:
cp6 2022-03-05 01:00:21 +11:00
parent 85e4024258
commit b7ce9b7402

View File

@ -14,8 +14,9 @@ class CreateLabelsAssignedTable extends Migration
public function up() public function up()
{ {
Schema::create('labels_assigned', function (Blueprint $table) { Schema::create('labels_assigned', function (Blueprint $table) {
$table->char('label_id', 8)->unique(); $table->char('label_id', 8);
$table->char('service_id', 8)->unique(); $table->char('service_id', 8);
$table->unique(['label_id','service_id'], 'uni');
}); });
} }