Files
opensem/database/migrations/2021_06_05_192053_create_comments_table.php
Ludovic CANDELLIER 0879b0abf0 add shipping rules
2023-07-16 14:45:42 +02:00

32 lines
744 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
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');
}
}