sparkbooth anbindung gefixt

This commit is contained in:
2025-12-07 17:39:23 +01:00
parent 08ee2205f5
commit b0d835d142
10 changed files with 597 additions and 40 deletions

View File

@@ -35,6 +35,9 @@ class GalleryFactory extends Factory
'upload_enabled' => false,
'upload_token_hash' => null,
'upload_token_expires_at' => null,
'sparkbooth_username' => 'spark-'.$this->faker->regexify('[a-z0-9]{6}'),
'sparkbooth_password' => 'pw-'.$this->faker->regexify('[A-Za-z0-9]{10}'),
'sparkbooth_response_format' => 'json',
];
}
}

View File

@@ -0,0 +1,38 @@
<?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('galleries', function (Blueprint $table): void {
$table->string('sparkbooth_username')->nullable()->after('upload_token_expires_at');
$table->text('sparkbooth_password')->nullable()->after('sparkbooth_username');
$table->string('sparkbooth_response_format', 10)->default('json')->after('sparkbooth_password');
$table->unique('sparkbooth_username');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('galleries', function (Blueprint $table): void {
$table->dropUnique(['sparkbooth_username']);
$table->dropColumn([
'sparkbooth_username',
'sparkbooth_password',
'sparkbooth_response_format',
]);
});
}
};

View File

@@ -33,6 +33,9 @@ class GallerySeeder extends Seeder
'upload_enabled' => false,
'upload_token_hash' => null,
'upload_token_expires_at' => null,
'sparkbooth_username' => null,
'sparkbooth_password' => null,
'sparkbooth_response_format' => 'json',
]
);
}