37 lines
833 B
PHP
37 lines
833 B
PHP
<?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')->unique();
|
|
$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');
|
|
}
|
|
}
|