Remove legacy acceptance criteria storage
This commit is contained in:
@@ -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');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user