finished laravel migration

This commit is contained in:
2025-12-29 18:19:24 +01:00
parent bdfbe3ffd6
commit 63bd166a65
218 changed files with 21830 additions and 15154 deletions

View File

@@ -0,0 +1,55 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('settings', function (Blueprint $table) {
$table->id();
$table->string('key', 100)->unique();
$table->text('value');
$table->timestamps();
});
Schema::table('settings', function (Blueprint $table) {
$table->index('key', 'idx_settings_key');
});
DB::table('settings')->insert([
[
'key' => 'version',
'value' => '25.00.1',
'created_at' => now(),
'updated_at' => now(),
],
[
'key' => 'build',
'value' => '3',
'created_at' => now(),
'updated_at' => now(),
],
[
'key' => 'accent_color',
'value' => '#f29b3f',
'created_at' => now(),
'updated_at' => now(),
],
]);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('settings');
}
};