You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virt/web/tests/CloudHostInventoryDiagnosti...

32 lines
1.3 KiB
PHP

<?php
use Illuminate\Database\Schema\Blueprint;
/** SQLite-only test fixture; production uses the MariaDB source schema. */
function createCloudHostInventoryAttemptTable($schema): void
{
$schema->create('cloud_host_inventory_attempts', static function (Blueprint $table): void {
$table->increments('sequence_id');
$table->string('attempt_id', 32)->unique();
$table->integer('host_id');
$table->string('source', 16);
$table->integer('generation')->default(0);
$table->integer('started_at');
$table->integer('finished_at')->nullable();
$table->integer('updated_at');
$table->integer('duration_ms')->default(0);
$table->string('outcome', 16)->default('running');
$table->string('stage', 32)->default('admission');
$table->string('error_code', 64)->default('');
$table->integer('http_status')->nullable();
$table->boolean('applied')->default(false);
$table->integer('timeout_ms');
$table->string('panel_version', 64);
$table->string('php_version', 32);
$table->text('stages_json');
$table->index(['host_id', 'started_at', 'sequence_id']);
$table->index(['outcome', 'started_at', 'sequence_id']);
$table->index(['started_at', 'sequence_id']);
});
}