This commit is contained in:
Mark Gregory
2026-10-01 10:58:07 +01:00
parent 3499fe382a
commit ead4483b7c
31 changed files with 1035 additions and 32 deletions
@@ -0,0 +1,42 @@
<?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('sonardesk_releases', function (Blueprint $table): void {
$table->id();
$table->string('version', 40);
$table->unsignedInteger('build_number')->default(1);
$table->string('channel', 20)->default('stable');
$table->string('minimum_macos', 30)->nullable();
$table->string('file_path')->nullable();
$table->string('original_filename')->nullable();
$table->unsignedBigInteger('file_size')->nullable();
$table->string('sha256', 64)->nullable();
$table->text('sparkle_signature')->nullable();
$table->text('release_notes')->nullable();
$table->boolean('is_published')->default(false)->index();
$table->boolean('is_featured')->default(false)->index();
$table->timestamp('published_at')->nullable()->index();
$table->unsignedBigInteger('download_count')->default(0);
$table->timestamps();
$table->unique(['version', 'build_number', 'channel']);
});
Schema::create('sonardesk_site_settings', function (Blueprint $table): void {
$table->string('key')->primary();
$table->text('value')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('sonardesk_site_settings');
Schema::dropIfExists('sonardesk_releases');
}
};