my-idlers/database/migrations/2022_02_08_010323_create_labels_assigned_table.php

33 lines
704 B
PHP
Raw Permalink Normal View History

<?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) {
2022-03-05 16:58:25 +01:00
$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');
}
}