pianello-api/database/migrations/2023_10_31_164720_create_feedback_table.php
Ale Gallo b91cf0cbde Committing laravel + api (part 1)
committing part of the laravel system with templating files and api implementation.
2023-11-10 15:54:41 +01:00

33 lines
837 B
PHP

<?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
{
Schema::create('feedback', 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');
}
};