atcheck/database/migrations/2019_11_26_232906_create_subjects_table.php

38 lines
875 B
PHP
Raw Normal View History

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSubjectsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('subjects', function (Blueprint $table) {
$table->bigIncrements('id')->unique();
$table->string('name');
// $table->string('type')->nullable();
2019-12-01 19:31:49 +01:00
$table->string('weekday')->nullable();
$table->string('time')->nullable();
// $table->integer('room_id');
$table->integer('user_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('subjects');
}
}