Выполнение шага 5:
• Updated Plan
└ Продолжаю итерацию 5 как отдельный рабочий срез поверх текущих SSH credentials.
□ Добавить модель/миграцию/repository для host_scans и покрыть repository тестами
□ Добавить SSH command runner и LinuxHostScanner с whitelist read-only команд
□ Подключить controller/routes/UI для запуска deep scan и просмотра результата
□ Прогнать проверки и зафиксировать ограничения Docker-верификации
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class CreateCredentials extends AbstractMigration
|
||||
{
|
||||
public function change(): void
|
||||
{
|
||||
$table = $this->table('credentials');
|
||||
$table
|
||||
->addColumn('device_id', 'integer', ['null' => false])
|
||||
->addColumn('type', 'string', ['limit' => 30, 'null' => false, 'default' => 'ssh'])
|
||||
->addColumn('name', 'string', ['limit' => 255, 'null' => false])
|
||||
->addColumn('username', 'string', ['limit' => 255, 'null' => false])
|
||||
->addColumn('port', 'integer', ['null' => false, 'default' => 22])
|
||||
->addColumn('auth_method', 'string', ['limit' => 30, 'null' => false, 'default' => 'password'])
|
||||
->addColumn('encrypted_secret', 'text', ['null' => true])
|
||||
->addColumn('encrypted_private_key', 'text', ['null' => true])
|
||||
->addColumn('public_key_fingerprint', 'string', ['limit' => 255, 'null' => true])
|
||||
->addColumn('last_test_status', 'string', ['limit' => 30, 'null' => true])
|
||||
->addColumn('last_test_at', 'datetime', ['null' => true])
|
||||
->addColumn('created_at', 'datetime', ['null' => false, 'default' => 'CURRENT_TIMESTAMP'])
|
||||
->addColumn('updated_at', 'datetime', ['null' => false, 'default' => 'CURRENT_TIMESTAMP'])
|
||||
->addIndex(['device_id'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user