Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/job-board.corals.io/Corals/modules/Jobs/database/migrations/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/job-board.corals.io/Corals/modules/Jobs/database/migrations/JobsTables.php
<?php

namespace Corals\Modules\Jobs\database\migrations;

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

class JobsTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */

    public function up()
    {
        Schema::create('jo_employers', function (Blueprint $table) {
            $table->increments('id');

            $table->unsignedInteger('user_id');
            $table->string('name');
            $table->text('description')->nullable();
            $table->unsignedInteger('location_id')->nullable();
            $table->string('salary')->nullable();
            $table->string('field_code')->nullable();

            $table->unsignedInteger('created_by')->nullable()->index();
            $table->unsignedInteger('updated_by')->nullable()->index();

            $table->text('properties')->nullable();
            $table->softDeletes();
            $table->timestamps();

            $table->foreign('location_id')
                ->references('id')
                ->on('utility_locations');

            $table->foreign('field_code')
                ->references('code')
                ->on('utility_list_of_values');

            $table->foreign('user_id')->references('id')
                ->on('users');
        });

        Schema::create('jo_branches', function (Blueprint $table) {
            $table->increments('id');

            $table->string('name');
            $table->unsignedInteger('employer_id');
            $table->unsignedInteger('location_id')->nullable();
            $table->text('short_description')->nullable();

            $table->unsignedInteger('created_by')->nullable()->index();
            $table->unsignedInteger('updated_by')->nullable()->index();
            $table->text('properties')->nullable();
            $table->softDeletes();
            $table->timestamps();

            $table->foreign('location_id')->references('id')
                ->on('utility_locations');

            $table->foreign('employer_id')->references('id')
                ->on('jo_employers')
                ->onDelete('cascade')
                ->onUpdate('cascade');
        });
        Schema::create('jo_jobs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('slug')->unique()->index();
            $table->unsignedInteger('owner_id')->nullable();
            $table->string('title')->nullable();
            $table->text('description')->nullable();
            $table->text('short_description')->nullable();
            $table->string('job_type')->nullable();
            $table->string('experience_level')->nullable();
            $table->string('salary')->nullable();
            $table->unsignedInteger('location_id')->index()->nullable();
            $table->string('status')->default('draft');//['draft', 'published', 'ended']
            $table->date('starts_at')->nullable();
            $table->date('ends_at')->nullable();
            $table->text('schedule')->nullable();
            $table->unsignedInteger('created_by')->nullable()->index();
            $table->unsignedInteger('updated_by')->nullable()->index();
            $table->text('properties')->nullable();
            $table->softDeletes();
            $table->timestamps();

            $table->foreign('owner_id')->references('id')
                ->on('jo_employers')
                ->onDelete('cascade')
                ->onUpdate('cascade');

            $table->foreign('location_id')->references('id')
                ->on('utility_locations');

            $table->foreign('job_type')->references('code')
                ->on('utility_list_of_values');

            $table->foreign('experience_level')->references('code')
                ->on('utility_list_of_values');
        });

        Schema::create('jo_job_applications', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('job_id');
            $table->unsignedInteger('user_id');
            $table->text('user_notes')->nullable();
            $table->text('admin_notes')->nullable();
            $table->string('status')->default('submitted');
            $table->text('schedule_date')->nullable();
            $table->text('schedule_time')->nullable();
            $table->unsignedInteger('created_by')->nullable()->index();
            $table->unsignedInteger('updated_by')->nullable()->index();
            $table->text('properties')->nullable();
            $table->softDeletes();
            $table->timestamps();

            $table->foreign('job_id')->references('id')->on('jo_jobs')->onDelete('cascade')->onUpdate('cascade');
            $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade');
        });


        Schema::create('jo_candidates', function (Blueprint $table) {
            $table->increments('id');

            $table->unsignedInteger('location_id')->nullable();
            $table->string('salary')->nullable();
            $table->string('profession')->nullable();
            $table->unsignedInteger('user_id');
            $table->unsignedInteger('created_by')->nullable()->index();
            $table->unsignedInteger('updated_by')->nullable()->index();
            $table->text('properties')->nullable();
            $table->softDeletes();
            $table->timestamps();

            $table->foreign('location_id')->references('id')
                ->on('utility_locations');

            $table->foreign('user_id')->references('id')
                ->on('users')->
                onDelete('cascade')
                ->onUpdate('cascade');

            $table->foreign('profession')
                ->references('code')
                ->on('utility_list_of_values');
        });

        Schema::create('jo_work_experiences', function (Blueprint $table) {
            $table->increments('id');

            $table->string('title');
            $table->unsignedInteger('candidate_id');
            $table->text('short_description')->nullable();
            $table->date('starts_at')->nullable();
            $table->date('ends_at')->nullable();

            $table->unsignedInteger('created_by')->nullable()->index();
            $table->unsignedInteger('updated_by')->nullable()->index();
            $table->text('properties')->nullable();
            $table->softDeletes();
            $table->timestamps();

            $table->foreign('candidate_id')->references('id')
                ->on('jo_candidates')
                ->onDelete('cascade')
                ->onUpdate('cascade');
        });
        Schema::create('jo_educations', function (Blueprint $table) {
            $table->increments('id');

            $table->string('title');
            $table->text('short_description')->nullable();
            $table->unsignedInteger('candidate_id');
            $table->date('starts_at')->nullable();
            $table->date('ends_at')->nullable();

            $table->unsignedInteger('created_by')->nullable()->index();
            $table->unsignedInteger('updated_by')->nullable()->index();
            $table->text('properties')->nullable();
            $table->softDeletes();
            $table->timestamps();

            $table->foreign('candidate_id')->references('id')
                ->on('jo_candidates')
                ->onDelete('cascade')
                ->onUpdate('cascade');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('jo_educations');
        Schema::dropIfExists('jo_work_experiences');
        Schema::dropIfExists('jo_candidates');
        Schema::dropIfExists('jo_job_applications');
        Schema::dropIfExists('jo_jobs');
        Schema::dropIfExists('jo_branches');
        Schema::dropIfExists('jo_employers');
    }
}

Spamworldpro Mini