<?php

class Migration_20250127153851_hardware_columns_ca_null
{
    public static function up(PDO $pdo)
    {
        $query = "
            ALTER TABLE hardware_devices 
            MODIFY COLUMN ip_address VARCHAR(56) NULL,
            MODIFY COLUMN http_port INT NULL;
        ";
        $pdo->exec($query);
    }

    public static function down(PDO $pdo)
    {
        $query = "
            ALTER TABLE hardware_devices 
            MODIFY COLUMN ip_address VARCHAR(15) NOT NULL,
            MODIFY COLUMN http_port INT NOT NULL;
        ";
        $pdo->exec($query);
    }
}