From 25af2ee701f6230644aedf64cf3d1dcadf8589d1 Mon Sep 17 00:00:00 2001 From: Alex Renoki Date: Fri, 11 Sep 2020 08:47:28 +0300 Subject: [PATCH] Fixed migrations for tests --- tests/TestCase.php | 2 +- ...te_websockets_statistics_entries_table.php | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 tests/database/migrations/0000_00_00_000000_create_websockets_statistics_entries_table.php diff --git a/tests/TestCase.php b/tests/TestCase.php index e62b10d..668e92b 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -74,7 +74,7 @@ abstract class TestCase extends Orchestra $this->resetDatabase(); $this->loadLaravelMigrations(['--database' => 'sqlite']); - $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); + $this->loadMigrationsFrom(__DIR__.'/database/migrations'); $this->withFactories(__DIR__.'/database/factories'); $this->registerManagers(); diff --git a/tests/database/migrations/0000_00_00_000000_create_websockets_statistics_entries_table.php b/tests/database/migrations/0000_00_00_000000_create_websockets_statistics_entries_table.php new file mode 100644 index 0000000..0989f28 --- /dev/null +++ b/tests/database/migrations/0000_00_00_000000_create_websockets_statistics_entries_table.php @@ -0,0 +1,35 @@ +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'); + } +}