changeweb/Unifiedtransform

View on GitHub
database/migrations/2021_08_29_083730_create_student_parent_infos_table.php

Summary

Maintainability
A
1 hr
Test Coverage
<?php

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

class CreateStudentParentInfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('student_parent_infos', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('student_id');
            $table->string('father_name');
            $table->string('father_phone');
            $table->string('mother_name');
            $table->string('mother_phone');
            $table->string('parent_address');
            $table->timestamps();
        });
    }

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