<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
    public function up(): void
    {
        DB::statement("ALTER TABLE website_sections DROP CONSTRAINT IF EXISTS website_sections_section_key_check");
        DB::statement("ALTER TABLE website_sections ADD CONSTRAINT website_sections_section_key_check CHECK (section_key IN (
            'hero', 'about', 'activities', 'programs', 'branches', 'schedule',
            'trainers', 'gallery', 'testimonials', 'pricing', 'partners',
            'contact', 'faq', 'cta', 'stats', 'news', 'events', 'video', 'custom_html'
        ))");
    }

    public function down(): void
    {
        DB::statement("ALTER TABLE website_sections DROP CONSTRAINT IF EXISTS website_sections_section_key_check");
        DB::statement("ALTER TABLE website_sections ADD CONSTRAINT website_sections_section_key_check CHECK (section_key IN (
            'hero', 'about', 'activities', 'programs', 'branches', 'schedule',
            'trainers', 'gallery', 'testimonials', 'pricing', 'partners',
            'contact', 'faq', 'cta', 'stats', 'news', 'video', 'custom_html'
        ))");
    }
};
