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']); }); }