Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 544b0a1

Browse files
committed
wip
1 parent 7a77445 commit 544b0a1

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

database/migrations/0000_00_00_000000_create_websockets_statistics_entries_table.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ public function up()
1616
Schema::create('websockets_statistics_entries', function (Blueprint $table) {
1717
$table->increments('id');
1818
$table->string('app_id');
19-
$table->integer('peak_connections_count');
20-
$table->integer('websocket_messages_count');
21-
$table->integer('api_messages_count');
19+
$table->integer('peak_connection_count');
20+
$table->integer('websocket_message_count');
21+
$table->integer('api_message_count');
2222
$table->nullableTimestamps();
2323
});
2424
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
class RenameStatisticsCounters extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::table('websockets_statistics_entries', function (Blueprint $table) {
17+
$table->renameColumn('peak_connection_count', 'peak_connections_count');
18+
$table->renameColumn('websocket_message_count', 'websocket_messages_count');
19+
$table->renameColumn('api_message_count', 'api_messages_count');
20+
});
21+
}
22+
23+
/**
24+
* Reverse the migrations.
25+
*
26+
* @return void
27+
*/
28+
public function down()
29+
{
30+
Schema::table('websockets_statistics_entries', function (Blueprint $table) {
31+
$table->renameColumn('peak_connections_count', 'peak_connection_count');
32+
$table->renameColumn('websocket_messages_count', 'websocket_message_count');
33+
$table->renameColumn('api_messages_count', 'api_message_count');
34+
});
35+
}
36+
}

src/WebSocketsServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function boot()
3131

3232
$this->publishes([
3333
__DIR__.'/../database/migrations/0000_00_00_000000_create_websockets_statistics_entries_table.php' => database_path('migrations/0000_00_00_000000_create_websockets_statistics_entries_table.php'),
34+
__DIR__.'/../database/migrations/0000_00_00_000000_rename_statistics_counters.php' => database_path('migrations/0000_00_00_000000_rename_statistics_counters.php'),
3435
], 'migrations');
3536

3637
$this->registerDashboard();

0 commit comments

Comments
 (0)