2019_04_22_121024_create_jobs_table.php 1.38 KB
Newer Older
Kittisak Maneewong's avatar
Kittisak Maneewong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
<?php

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

class CreateJobsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('jobs', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('job_title');
            $table->string('job_type');
            $table->string('department');
            $table->integer('salary')->nullable();
            $table->string('branch')->nullable();
            $table->string('day')->nullable();
            $table->string('time')->nullable();
            $table->integer('num')->nullable();
            $table->string('gender')->nullable();
            $table->string('degree')->nullable();
            $table->string('gpax')->nullable();
            $table->string('phase')->nullable();
            $table->text('feature')->nullable();
            $table->text('role')->nullable();
            $table->text('welfare')->nullable();
            $table->unsignedBigInteger('user_id');
            $table->foreign('user_id')->references('id')->on('users');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('jobs');
    }
}