This commit is contained in:
Ludovic CANDELLIER
2021-04-08 16:18:21 +02:00
parent 8ec6f24df4
commit d53e9f5a4f
20 changed files with 2488 additions and 14 deletions

View File

@@ -0,0 +1,31 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCommentsTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create('comments', function (Blueprint $table) {
$table->increments('id');
$table->morphs('commentable');
$table->text('comment');
$table->boolean('is_approved')->default(false);
$table->unsignedBigInteger('user_id')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists('comments');
}
}