Ale Gallo
b91cf0cbde
committing part of the laravel system with templating files and api implementation.
33 lines
837 B
PHP
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');
|
|
}
|
|
};
|