Files
back-meditation/database/migrations/2026_06_15_100000_create_themes_table.php
T
2026-06-14 15:06:11 +03:30

27 lines
792 B
PHP

<?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('themes', function (Blueprint $table) {
$table->id();
$table->string('key')->unique(); // blue, pink, green, orange, purple
$table->string('name'); // display label
$table->json('colors'); // full color map (json works on MySQL & Postgres)
$table->integer('order')->default(0);
$table->boolean('is_active')->default(true);
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('themes');
}
};