<?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::disableForeignKeyConstraints();

        Schema::dropIfExists('shop_order_items');
        Schema::dropIfExists('shop_orders');
        Schema::dropIfExists('payments');
        Schema::dropIfExists('shop_category_product');
        Schema::dropIfExists('shop_products');
        Schema::dropIfExists('shop_categories');
        Schema::dropIfExists('shop_brands');
        Schema::dropIfExists('shop_customers');

        Schema::dropIfExists('blog_posts');
        Schema::dropIfExists('blog_categories');
        Schema::dropIfExists('blog_authors');

        Schema::dropIfExists('comments');
        Schema::dropIfExists('addressables');
        Schema::dropIfExists('addresses');

        Schema::dropIfExists('media');
        Schema::dropIfExists('tags');
        Schema::dropIfExists('taggables');
        Schema::dropIfExists('settings');

        Schema::dropIfExists('exports');
        Schema::dropIfExists('imports');
        Schema::dropIfExists('failed_import_rows');

        Schema::dropIfExists('teams');

        Schema::enableForeignKeyConstraints();
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        // Intentionally left empty. Restoring these legacy feature tables is not required.
    }
};
