feat(canvas): add interactive resource views and team avatars (#12160)

This commit is contained in:
Andras Bacsai
2026-10-14 09:28:10 +02:00
committed by GitHub
parent 448dc8ea0a
commit 33ee09fa87
146 changed files with 12076 additions and 367 deletions
@@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('environments', function (Blueprint $table) {
$table->json('canvas_positions')->nullable();
});
}
public function down(): void
{
Schema::table('environments', function (Blueprint $table) {
$table->dropColumn('canvas_positions');
});
}
};
@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('resource_links', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->foreignId('environment_id')->constrained()->cascadeOnDelete();
$table->morphs('source');
$table->morphs('target');
$table->string('label', 64)->nullable();
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
$table->timestamps();
$table->unique(['environment_id', 'source_type', 'source_id', 'target_type', 'target_id'], 'resource_links_unique_direction');
});
}
public function down(): void
{
Schema::dropIfExists('resource_links');
}
};
@@ -0,0 +1,31 @@
<?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::table('teams', function (Blueprint $table) {
$table->string('avatar_path')->nullable();
$table->string('avatar_storage_type')->nullable();
$table->foreignId('avatar_s3_storage_id')->nullable()->constrained('s3_storages')->nullOnDelete();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('teams', function (Blueprint $table) {
$table->dropConstrainedForeignId('avatar_s3_storage_id');
$table->dropColumn(['avatar_path', 'avatar_storage_type']);
});
}
};