2019-11-27 00:46:00 +01:00
|
|
|
<?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) {
|
2019-12-03 12:45:04 +01:00
|
|
|
$table->bigIncrements('id')->unique();
|
2019-11-27 00:46:00 +01:00
|
|
|
$table->string('name');
|
2019-12-06 22:34:25 +01:00
|
|
|
// $table->string('type')->nullable();
|
2019-12-01 19:31:49 +01:00
|
|
|
$table->string('weekday')->nullable();
|
|
|
|
$table->string('time')->nullable();
|
2019-12-09 12:17:23 +01:00
|
|
|
$table->integer('room_id');
|
2019-11-27 00:46:00 +01:00
|
|
|
$table->integer('user_id');
|
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('subjects');
|
|
|
|
}
|
|
|
|
}
|