Add project repository connection settings
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?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('repository_connections', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('project_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('provider');
|
||||
$table->string('base_url');
|
||||
$table->string('provider_repository_id');
|
||||
$table->string('owner_name');
|
||||
$table->string('repository_name');
|
||||
$table->string('repository_full_name');
|
||||
$table->string('repository_url');
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique([
|
||||
'project_id',
|
||||
'provider',
|
||||
'base_url',
|
||||
'provider_repository_id',
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('repository_connections');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user