31 lines
1.0 KiB
PHP
31 lines
1.0 KiB
PHP
<?php
|
|||
|
|
|
||
|
|
use Illuminate\Database\Migrations\Migration;
|
||
|
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
|
use Illuminate\Support\Facades\Schema;
|
||
|
|
|
||
|
|
return new class extends Migration
|
||
|
|
{
|
||
|
|
public function up(): void
|
||
|
|
{
|
||
|
|
Schema::create('ideas', function (Blueprint $table) {
|
||
|
|
$table->id();
|
||
|
|
$table->string('title');
|
||
|
|
$table->text('description')->nullable();
|
||
|
|
$table->string('status')->default('new'); // new, considered, planned, rejected, implemented
|
||
|
|
$table->foreignId('project_id')->nullable()->constrained()->nullOnDelete();
|
||
|
|
$table->integer('priority')->default(0);
|
||
|
|
$table->string('category')->nullable(); // feature, improvement, bugfix, research, other
|
||
|
|
$table->string('tags')->nullable(); // comma-separated tags
|
||
|
|
$table->foreignId('user_id')->nullable()->constrained()->nullOnDelete();
|
||
|
|
$table->timestamps();
|
||
|
|
$table->softDeletes();
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
public function down(): void
|
||
|
|
{
|
||
|
|
Schema::dropIfExists('ideas');
|
||
|
|
}
|
||
|
|
};
|