wip
This commit is contained in:
parent
7a77445122
commit
544b0a120d
|
|
@ -16,9 +16,9 @@ class CreateWebSocketsStatisticsEntriesTable extends Migration
|
|||
Schema::create('websockets_statistics_entries', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('app_id');
|
||||
$table->integer('peak_connections_count');
|
||||
$table->integer('websocket_messages_count');
|
||||
$table->integer('api_messages_count');
|
||||
$table->integer('peak_connection_count');
|
||||
$table->integer('websocket_message_count');
|
||||
$table->integer('api_message_count');
|
||||
$table->nullableTimestamps();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
<?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()
|
||||
{
|
||||
Schema::table('websockets_statistics_entries', function (Blueprint $table) {
|
||||
$table->renameColumn('peak_connection_count', 'peak_connections_count');
|
||||
$table->renameColumn('websocket_message_count', 'websocket_messages_count');
|
||||
$table->renameColumn('api_message_count', 'api_messages_count');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('websockets_statistics_entries', function (Blueprint $table) {
|
||||
$table->renameColumn('peak_connections_count', 'peak_connection_count');
|
||||
$table->renameColumn('websocket_messages_count', 'websocket_message_count');
|
||||
$table->renameColumn('api_messages_count', 'api_message_count');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -31,6 +31,7 @@ class WebSocketsServiceProvider extends ServiceProvider
|
|||
|
||||
$this->publishes([
|
||||
__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'),
|
||||
__DIR__.'/../database/migrations/0000_00_00_000000_rename_statistics_counters.php' => database_path('migrations/0000_00_00_000000_rename_statistics_counters.php'),
|
||||
], 'migrations');
|
||||
|
||||
$this->registerDashboard();
|
||||
|
|
|
|||
Loading…
Reference in New Issue