my-idlers/database/migrations/2022_02_08_010323_create_labels_assigned_table.php
cp6 14bd846c67 Updated unique key naming to prevent conflicts
Updated unique key naming to prevent conflicts
2022-03-07 13:25:32 +11:00

33 lines
704 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLabelsAssignedTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('labels_assigned', function (Blueprint $table) {
$table->char('label_id', 8);
$table->char('service_id', 8);
$table->unique(['label_id','service_id'], 'labels_assigned_u1');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('labels_assigned');
}
}