fix git
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
|
||||
<?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::create('git_commits', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
|
||||
$table->string('repository_full_name')->index();
|
||||
$table->string('repository_name')->nullable();
|
||||
|
||||
$table->unsignedBigInteger('ticket_id')->nullable();
|
||||
|
||||
$table->string('sha', 64)->unique();
|
||||
$table->string('branch')->nullable();
|
||||
|
||||
$table->string('author_name')->nullable();
|
||||
$table->string('author_email')->nullable();
|
||||
|
||||
$table->text('message');
|
||||
|
||||
$table->string('commit_url')->nullable();
|
||||
|
||||
$table->timestamp('committed_at')->nullable();
|
||||
|
||||
$table->json('payload')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('ticket_id')
|
||||
->references('id')
|
||||
->on('helpdesk_tickets')
|
||||
->nullOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('git_commits');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user