Add guest policy settings
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-01 20:25:39 +01:00
parent 25d464215e
commit c180b37760
15 changed files with 500 additions and 19 deletions

View File

@@ -0,0 +1,39 @@
<?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('guest_policy_settings', function (Blueprint $table) {
$table->id();
$table->boolean('guest_downloads_enabled')->default(true);
$table->boolean('guest_sharing_enabled')->default(true);
$table->string('guest_upload_visibility')->default('review');
$table->unsignedInteger('per_device_upload_limit')->default(50);
$table->unsignedInteger('join_token_failure_limit')->default(10);
$table->unsignedInteger('join_token_failure_decay_minutes')->default(5);
$table->unsignedInteger('join_token_access_limit')->default(120);
$table->unsignedInteger('join_token_access_decay_minutes')->default(1);
$table->unsignedInteger('join_token_download_limit')->default(60);
$table->unsignedInteger('join_token_download_decay_minutes')->default(1);
$table->unsignedInteger('share_link_ttl_hours')->default(48);
$table->unsignedInteger('guest_notification_ttl_hours')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('guest_policy_settings');
}
};