38 lines
910 B
PHP
38 lines
910 B
PHP
|
<?php
|
||
|
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
use Illuminate\Support\Facades\Schema;
|
||
|
|
||
|
class CreateAttendancesTable extends Migration
|
||
|
{
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
Schema::create('attendance', function (Blueprint $table) {
|
||
|
$table->bigIncrements('id');
|
||
|
$table->integer('classes_id');
|
||
|
$table->integer('student_id_number');
|
||
|
$table->string('student_name');
|
||
|
$table->string('student_surname');
|
||
|
$table->integer('seat_number');
|
||
|
$table->timestamps();
|
||
|
$table->foreign('classes_id')->references('id')->on('classes');
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::dropIfExists('attendances');
|
||
|
}
|
||
|
}
|