Fixed migrations for tests

This commit is contained in:
Alex Renoki 2020-09-11 08:47:28 +03:00
parent b5ddef3544
commit 25af2ee701
2 changed files with 36 additions and 1 deletions

View File

@ -74,7 +74,7 @@ abstract class TestCase extends Orchestra
$this->resetDatabase(); $this->resetDatabase();
$this->loadLaravelMigrations(['--database' => 'sqlite']); $this->loadLaravelMigrations(['--database' => 'sqlite']);
$this->loadMigrationsFrom(__DIR__.'/../database/migrations'); $this->loadMigrationsFrom(__DIR__.'/database/migrations');
$this->withFactories(__DIR__.'/database/factories'); $this->withFactories(__DIR__.'/database/factories');
$this->registerManagers(); $this->registerManagers();

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateWebSocketsStatisticsEntriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
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->nullableTimestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('websockets_statistics_entries');
}
}