migrations fix
This commit is contained in:
@@ -19,6 +19,9 @@ return new class extends Migration
|
||||
$table->foreignId('assignee_user_id')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->foreignId('author_user_id')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->foreignId('ticket_status_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->foreignId('parent_ticket_id')->nullable()->constrained('tickets')->nullOnDelete();
|
||||
$table->boolean('is_blocked')->default(false);
|
||||
$table->text('blocked_comment')->nullable();
|
||||
$table->unsignedInteger('sequence_number');
|
||||
$table->string('ticket_key')->unique();
|
||||
$table->string('title');
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<?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::table('tickets', function (Blueprint $table) {
|
||||
$table->foreignId('parent_ticket_id')
|
||||
->nullable()
|
||||
->after('board_column_id')
|
||||
->constrained('tickets')
|
||||
->nullOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('tickets', function (Blueprint $table) {
|
||||
$table->dropConstrainedForeignId('parent_ticket_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1,33 +0,0 @@
|
||||
<?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::table('tickets', function (Blueprint $table) {
|
||||
$table->boolean('is_blocked')
|
||||
->default(false)
|
||||
->after('parent_ticket_id');
|
||||
$table->text('blocked_comment')
|
||||
->nullable()
|
||||
->after('is_blocked');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('tickets', function (Blueprint $table) {
|
||||
$table->dropColumn(['blocked_comment', 'is_blocked']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user