39 行
969 B
PHP
39 行
969 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateMeetingsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('meetings', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->unsignedBigInteger('father_id');
|
|
$table->foreign('father_id')->references('id')->on('fathers');
|
|
$table->string('title', 255);
|
|
$table->string('text', 2000);
|
|
$table->string('pdf', 255)->nullable();
|
|
$table->string('memo', 2000)->nullable();
|
|
$table->integer('is_favorite')->nullable()->default(0);
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('meetings');
|
|
}
|
|
}
|