Implement Gitea user connection foundation
This commit is contained in:
@@ -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
|
||||
{
|
||||
Schema::create('user_git_connections', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('provider');
|
||||
$table->string('base_url');
|
||||
$table->string('provider_user_id');
|
||||
$table->string('account_login');
|
||||
$table->string('account_name')->nullable();
|
||||
$table->text('api_token');
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['user_id', 'provider', 'base_url']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('user_git_connections');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user