Files
docker-rconfig/database/migrations/2022_02_12_162838_create_health_tables.php
2024-10-19 18:23:55 +00:00

41 lines
1.1 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Spatie\Health\ResultStores\EloquentHealthResultStore;
return new class extends Migration
{
public function up()
{
$tableName = EloquentHealthResultStore::getHistoryItemInstance()->getTable();
Schema::create($tableName, function (Blueprint $table) {
$table->id();
$table->string('check_name');
$table->string('check_label');
$table->string('status');
$table->text('notification_message')->nullable();
$table->string('short_summary')->nullable();
$table->json('meta');
$table->timestamp('ended_at');
$table->uuid('batch');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$tableName = EloquentHealthResultStore::getHistoryItemInstance()->getTable();
Schema::dropIfExists($tableName);
}
};