Ideenbox (0.33.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 9m16s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 9m12s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 9m52s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 9m47s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 10m4s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 10m6s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 8m6s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 56s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 8m56s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m53s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 9m16s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 9m12s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 9m52s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 9m47s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 10m4s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 10m6s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 8m6s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 56s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 8m56s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m53s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bd7536ab82
commit
858e248d26
160 changed files with 1543 additions and 348 deletions
|
|
@ -0,0 +1,54 @@
|
|||
<?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', 160);
|
||||
$table->text('body');
|
||||
// Anonym eingereicht: keine Person gespeichert
|
||||
$table->foreignId('author_id')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->boolean('anonymous')->default(false);
|
||||
// new | review | done | rejected
|
||||
$table->string('status', 20)->default('new');
|
||||
$table->text('status_note')->nullable();
|
||||
$table->timestamp('status_changed_at')->nullable();
|
||||
$table->unsignedInteger('supports_count')->default(0);
|
||||
$table->unsignedInteger('comments_count')->default(0);
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['status', 'created_at']);
|
||||
});
|
||||
|
||||
Schema::create('idea_supports', function (Blueprint $table) {
|
||||
$table->foreignId('idea_id')->constrained('ideas')->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->timestamp('created_at')->nullable();
|
||||
|
||||
$table->primary(['idea_id', 'user_id']);
|
||||
});
|
||||
|
||||
Schema::create('idea_comments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('idea_id')->constrained('ideas')->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->text('body');
|
||||
// Antwort des Gremiums (hervorgehoben)
|
||||
$table->boolean('official')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('idea_comments');
|
||||
Schema::dropIfExists('idea_supports');
|
||||
Schema::dropIfExists('ideas');
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue