42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateEintragungsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('eintragungen', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->timestamps();
|
|
|
|
$table->integer('benutzer_id')->unsigned();
|
|
$table->foreign('benutzer_id')->references('id')->on('benutzer');
|
|
|
|
$table->integer('veranstaltung_id')->unsigned();
|
|
$table->foreign('veranstaltung_id')->references('id')->on('veranstaltungen');
|
|
|
|
$table->boolean('nicht_unbedingt')->default(false);
|
|
$table->dateTime('kann_ab')->nullable();
|
|
$table->dateTime('kann_bis')->nullable();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('eintragungen');
|
|
}
|
|
}
|