add new public repo
This commit is contained in:
@@ -13,10 +13,10 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('environments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->string('name')->unique();
|
||||
$table->string('name');
|
||||
$table->foreignId('project_id');
|
||||
$table->timestamps();
|
||||
$table->unique(['name', 'project_id']);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ return new class extends Migration
|
||||
|
||||
$table->string('status')->default('exited');
|
||||
|
||||
$table->morphs('destination');
|
||||
$table->nullableMorphs('destination');
|
||||
$table->morphs('source');
|
||||
|
||||
$table->foreignId('environment_id');
|
||||
|
||||
38
database/migrations/2023_03_28_083722_create_gits_table.php
Normal file
38
database/migrations/2023_03_28_083722_create_gits_table.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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('gits', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->enum('type', ['github', 'gitlab', 'bitbucket', 'custom']);
|
||||
|
||||
$table->string('api_url');
|
||||
$table->string('html_url');
|
||||
|
||||
$table->integer('custom_port')->default(22);
|
||||
$table->string('custom_user')->default('git');
|
||||
|
||||
$table->longText('webhook_secret')->nullable();
|
||||
$table->foreignId('private_key_id')->nullable();
|
||||
$table->foreignId('project_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('gits');
|
||||
}
|
||||
};
|
||||
@@ -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::create('git_deploy_keys', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('url');
|
||||
|
||||
$table->foreignId('private_key_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('git_deploy_keys');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user