<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class () extends Migration {
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('photos', function (Blueprint $table) {
            $table->renameColumn('stat_number', 'title');
            $table->renameColumn('stat_name', 'subtitle');
        });

        Schema::table('content_filters', function (Blueprint $table) {
            $table->renameColumn('stat_number', 'title');
            $table->renameColumn('stat_name', 'subtitle');
        });

        Schema::table('text_blocks', function (Blueprint $table) {
            $table->renameColumn('stat_number', 'title');
            $table->renameColumn('stat_name', 'subtitle');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('photos', function (Blueprint $table) {
            //
        });
    }
};
