pianello-api/database/migrations/2023_10_31_164720_create_feedback_table.php

34 lines
838 B
PHP
Raw Normal View History

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
2023-12-13 15:42:32 +01:00
Schema::create('feedbacks', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->text('body');
$table->unsignedInteger('rating');
$table->string('user_nickname',100);
$table->tinyInteger('approved')->default(0)->comment('when 1 the comment can be public');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('feedback');
}
};