mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-28 00:26:08 +00:00
- Add V5BootstrapServerJob: SSH into new servers, install coold/WireGuard, track bootstrap progress via last_bootstrap_action/status/output fields - Add V5ClusterUpdated event: broadcasts full cluster+servers payload to team private channel on bootstrap state changes - Add V5RealtimeTestEvent + RealtimeTest page for WebSocket connectivity testing - Consolidate 3 dropped migrations into base cluster/server migrations: WireGuard config, builder CPU quota, status check fields, uuid - Auto-generate uuid on V5Model create via Schema::hasColumn guard - Expose currentTeam.id in Inertia shared props - Add showCluster, realtimeTest, broadcastRealtimeTest controller endpoints - Add dropdown-menu UI component
24 lines
525 B
PHP
24 lines
525 B
PHP
<?php
|
|
|
|
namespace App\Models\V5;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
abstract class V5Model extends Model
|
|
{
|
|
protected static function boot(): void
|
|
{
|
|
parent::boot();
|
|
|
|
static::creating(function (Model $model): void {
|
|
if (
|
|
Schema::hasColumn($model->getTable(), 'uuid')
|
|
&& ! $model->getAttribute('uuid')
|
|
) {
|
|
$model->setAttribute('uuid', new_public_id());
|
|
}
|
|
});
|
|
}
|
|
}
|