File: /var/www/quadcode-jobs/database/migrations/2023_06_21_181000_location_position_relation_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class LocationPositionRelationTable extends Migration
{
public function up()
{
Schema::create('location_position_relations', function (Blueprint $table) {
$table->id();
$table->integer('location_id')->unsigned()->nullable();
$table->integer('position_id')->unsigned()->nullable();
$table->unique(['location_id', 'position_id'], 'unique_location_position');
});
}
public function down()
{
Schema::dropIfExists('location_position_relations');
}
}