HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/quadcode-jobs/database/migrations/2024_05_23_151000_recreate_vacancies_table.php
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class RecreateVacanciesTable extends Migration
{

    public function up()
    {
        Schema::create('vacancies', function (Blueprint $table) {
            $table->id();
            $table->string('external_id');
            $table->string('title');
            $table->string('state');
            $table->string('commitment')->nullable();
            $table->string('workplace_type');
            $table->string('department');
            $table->integer('category_id');
            $table->string('location');
            $table->string('country');
            $table->string('url')->nullable();
            $table->timestamps();

            $table->foreign('category_id')->references('id')->on('lever_categories')->onUpdate('CASCADE')->onDelete('CASCADE');
        });
    }

    public function down()
    {
        Schema::dropIfExists('vacancies');

        Schema::create('vacancies', function (Blueprint $table) {
            $table->bigInteger('id');
            $table->timestamps();

            $table->boolean('show_position')->default(true);
            $table->string('position')->nullable();
            $table->boolean('show_title')->default(true);
            $table->string('title')->nullable();
            $table->boolean('show_money')->default(true);
            $table->string('money')->nullable();
            $table->string('state')->nullable();
            $table->string('created_original')->nullable();
            $table->boolean('is_hidden')->default(false);
            $table->text('body')->nullable();
            $table->boolean('show_requirements')->default(true);
            $table->text('requirements')->nullable();
            $table->text('requirements_title')->nullable();
            $table->boolean('show_conditions')->default(true);
            $table->text('conditions')->nullable();
            $table->text('conditions_title')->nullable();
            $table->string('deadline')->nullable();
            $table->smallInteger('applicants_to_hire')->default(0);

            $table->boolean('show_team')->default(true);
            $table->string('team_title')->nullable();
            $table->boolean('show_location')->default(true);
            $table->integer('location_id')->nullable();
            $table->string('location_title')->nullable();
            $table->boolean('show_category')->default(true);
            $table->integer('category_id')->nullable();
            $table->string('category_title')->nullable();
            $table->boolean('show_type_of_work')->default(true);
            $table->integer('type_of_work_id')->nullable();
            $table->string('type_of_work_title')->nullable();
            $table->boolean('show_about_team')->default(true);
            $table->text('about_team')->nullable();
            $table->boolean('show_tasks')->default(true);
            $table->text('tasks')->nullable();

            $table->jsonb('files')->nullable();

            $table->primary('id');
            $table->foreign('location_id')->references('id_external')->on('locations')->onUpdate('CASCADE')->onDelete('CASCADE');

            $table->foreign('category_id')->references('id_external')->on('categories')->onUpdate('CASCADE')->onDelete('CASCADE');
        });
    }

}