<?php

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

class RenameStatisticsCounters extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        DB::statement('ALTER TABLE `websockets_statistics_entries` CHANGE COLUMN `peak_connection_count` `peak_connections_count` INT');

        DB::statement('ALTER TABLE `websockets_statistics_entries` CHANGE COLUMN `websocket_message_count` `websocket_messages_count` INT');

        DB::statement('ALTER TABLE `websockets_statistics_entries` CHANGE COLUMN `api_message_count` `api_message_count` INT');
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        DB::statement('ALTER TABLE `websockets_statistics_entries` CHANGE COLUMN `peak_connection_count` `peak_connections_count` INT');

        DB::statement('ALTER TABLE `websockets_statistics_entries` CHANGE COLUMN `websocket_message_count` `websocket_messages_count` INT');
        
        DB::statement('ALTER TABLE `websockets_statistics_entries` CHANGE COLUMN `api_message_count` `api_message_count` INT');
    }
}
