sparkbooth anbindung gefixt
This commit is contained in:
@@ -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',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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',
|
||||
]);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -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',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user