Remove legacy acceptance criteria storage
linter / quality (pull_request) Successful in 2m4s
tests / ci (8.4) (pull_request) Successful in 1m52s

This commit is contained in:
2026-05-19 23:12:15 +00:00
parent 689db9e41b
commit 5aebd4f9ef
16 changed files with 109 additions and 145 deletions
-1
View File
@@ -22,7 +22,6 @@ class TicketFactory extends Factory
public function definition(): array
{
return [
'acceptance_criteria' => fake()->paragraph(),
'assignee_user_id' => null,
'author_user_id' => User::factory(),
'blocked_comment' => null,
@@ -26,7 +26,6 @@ return new class extends Migration
$table->string('ticket_key')->unique();
$table->string('title');
$table->text('description')->nullable();
$table->text('acceptance_criteria')->nullable();
$table->unsignedInteger('story_points')->nullable()->default(null);
$table->timestamps();
@@ -0,0 +1,36 @@
<?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
{
if (! Schema::hasColumn('tickets', 'acceptance_criteria')) {
return;
}
Schema::table('tickets', function (Blueprint $table): void {
$table->dropColumn('acceptance_criteria');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
if (Schema::hasColumn('tickets', 'acceptance_criteria')) {
return;
}
Schema::table('tickets', function (Blueprint $table): void {
$table->text('acceptance_criteria')->nullable()->after('description');
});
}
};
+10 -2
View File
@@ -42,7 +42,11 @@ class TicketSeeder extends Seeder
->firstOrFail();
$createProjectTicket->handle($project, [
'acceptance_criteria' => 'The seeded ticket should be visible in the backlog list.',
'acceptance_criteria' => [[
'checked' => false,
'indent' => 0,
'text' => 'The seeded ticket should be visible in the backlog list.',
]],
'assignee_user_id' => $assignee?->id,
'description' => 'Seeded backlog item for demonstrating the first ticket workflow.',
'story_points' => 3,
@@ -53,7 +57,11 @@ class TicketSeeder extends Seeder
], $author);
$createProjectTicket->handle($project, [
'acceptance_criteria' => 'Duplicate titles must be allowed for project-local ticket keys.',
'acceptance_criteria' => [[
'checked' => false,
'indent' => 0,
'text' => 'Duplicate titles must be allowed for project-local ticket keys.',
]],
'assignee_user_id' => null,
'description' => 'Second seeded backlog item using the same title on purpose.',
'story_points' => 5,