File: /var/www/quadcode-jobs/database/migrations/2024_05_23_143500_create_lever_locations_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLeverLocationsTable extends Migration
{
public function up()
{
Schema::create('lever_locations', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->integer('count')->default(0);
$table->timestamps();
});
Schema::dropIfExists('location_vacancy_relations');
Schema::create('location_vacancy_relations', function (Blueprint $table) {
$table->id();
$table->integer('vacancy_id')->unsigned();
$table->integer('location_id')->unsigned();
});
}
public function down()
{
Schema::dropIfExists('lever_locations');
Schema::dropIfExists('location_vacancy_relations');
}
}