MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 8.0.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/.trash/database.2/migrations/2022_03_07_000006_create_volunteer_hours_table.php
<?php

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

class CreateVolunteerHoursTable extends Migration
{
    public function up()
    {
        Schema::create('volunteer_hours', function (Blueprint $table) {
            
            $table->increments('id');

            $table->integer('volunteer_id')->unsigned();

            $table->integer('opportunity_id')->unsigned();
            $table->integer('event_id')->unsigned();

            $table->integer('work_status')->default(0);
            $table->integer('work_hours')->default(0);
            $table->integer('work_docs')->default(0);

			$table->timestamps();

            $table->softDeletes();

        });

        Schema::table('volunteer_hours', function($table) {
           $table->foreign('volunteer_id')->references('id')->on('users');
           $table->foreign('opportunity_id')->references('id')->on('opportunities');
           $table->foreign('event_id')->references('id')->on('live_events');
        });

    }
}