Implemented interaction with docker registry.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?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('personal_access_tokens', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->morphs('tokenable');
|
||||
$table->string('name');
|
||||
$table->string('token', 64)->unique();
|
||||
$table->text('abilities')->nullable();
|
||||
$table->timestamp('last_used_at')->nullable();
|
||||
$table->timestamp('expires_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('personal_access_tokens');
|
||||
}
|
||||
};
|
@@ -0,0 +1,74 @@
|
||||
<?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('operating_systems', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 255)->unique();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('architectures', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 255)->unique();
|
||||
$table->unsignedBigInteger('operating_system_id')->index();
|
||||
$table->foreign('operating_system_id')->references('id')->on('operating_systems');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('repositories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 150);
|
||||
$table->boolean('is_public')->default(0)->index();
|
||||
$table->unsignedBigInteger('user_id')->index();
|
||||
$table->foreign('user_id')->references('id')->on('users');
|
||||
$table->string('description', 300)->nullable();
|
||||
$table->longText('overview')->nullable();
|
||||
$table->unsignedBigInteger('quantity_pulls')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->unique(['user_id', 'name']);
|
||||
$table->index(['user_id', 'is_public']);
|
||||
$table->index('updated_at');
|
||||
});
|
||||
|
||||
Schema::create('tags_repository', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 128)->collation('ascii_bin');
|
||||
$table->unsignedBigInteger('architecture_id')->index();
|
||||
$table->foreign('architecture_id')->references('id')->on('architectures');
|
||||
$table->unsignedBigInteger('repository_id')->index();
|
||||
$table->foreign('repository_id')->references('id')->on('repositories');
|
||||
$table->string('digest', 100)->index();
|
||||
$table->unsignedBigInteger('size');
|
||||
$table->unsignedBigInteger('quantity_pulls')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index(['repository_id', 'name']);
|
||||
$table->unique(['repository_id', 'architecture_id', 'name']);
|
||||
$table->index('updated_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tags_repository');
|
||||
Schema::dropIfExists('repositories');
|
||||
Schema::dropIfExists('architectures');
|
||||
Schema::dropIfExists('operating_systems');
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user