style updates

This commit is contained in:
Mark Gregory
2026-07-24 14:59:44 +01:00
parent 24ab771cd3
commit dd23205d0b
482 changed files with 7173 additions and 1435 deletions
@@ -1,3 +1,27 @@
<?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('api_tokens',function(Blueprint $t): void {$t->id();$t->foreignId('user_id')->constrained()->cascadeOnDelete();$t->string('name');$t->string('token',64)->unique();$t->json('abilities')->nullable();$t->timestamp('last_used_at')->nullable();$t->timestamp('expires_at')->nullable();$t->timestamps();}); } public function down(): void {Schema::dropIfExists('api_tokens');} };
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('api_tokens', function (Blueprint $t): void {
$t->id();
$t->foreignId('user_id')->constrained()->cascadeOnDelete();
$t->string('name');
$t->string('token', 64)->unique();
$t->json('abilities')->nullable();
$t->timestamp('last_used_at')->nullable();
$t->timestamp('expires_at')->nullable();
$t->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('api_tokens');
}
};
@@ -1,3 +1,43 @@
<?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('webhooks',function(Blueprint $t): void {$t->id();$t->foreignId('site_id')->nullable()->constrained('sites')->nullOnDelete();$t->string('name');$t->string('url');$t->string('secret');$t->json('events');$t->boolean('is_active')->default(true);$t->unsignedSmallInteger('failure_count')->default(0);$t->timestamp('last_triggered_at')->nullable();$t->timestamps();}); Schema::create('webhook_deliveries',function(Blueprint $t): void {$t->id();$t->foreignId('webhook_id')->constrained()->cascadeOnDelete();$t->uuid('uuid')->unique();$t->string('event');$t->json('payload');$t->unsignedSmallInteger('response_status')->nullable();$t->text('response_body')->nullable();$t->unsignedSmallInteger('attempts')->default(0);$t->timestamp('delivered_at')->nullable();$t->timestamp('failed_at')->nullable();$t->timestamps();}); } public function down(): void {Schema::dropIfExists('webhook_deliveries');Schema::dropIfExists('webhooks');} };
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('webhooks', function (Blueprint $t): void {
$t->id();
$t->foreignId('site_id')->nullable()->constrained('sites')->nullOnDelete();
$t->string('name');
$t->string('url');
$t->string('secret');
$t->json('events');
$t->boolean('is_active')->default(true);
$t->unsignedSmallInteger('failure_count')->default(0);
$t->timestamp('last_triggered_at')->nullable();
$t->timestamps();
});
Schema::create('webhook_deliveries', function (Blueprint $t): void {
$t->id();
$t->foreignId('webhook_id')->constrained()->cascadeOnDelete();
$t->uuid('uuid')->unique();
$t->string('event');
$t->json('payload');
$t->unsignedSmallInteger('response_status')->nullable();
$t->text('response_body')->nullable();
$t->unsignedSmallInteger('attempts')->default(0);
$t->timestamp('delivered_at')->nullable();
$t->timestamp('failed_at')->nullable();
$t->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('webhook_deliveries');
Schema::dropIfExists('webhooks');
}
};