<?php

class Migration_20250721153628_alter_table_hardware_settings_events
{
    public static function up(PDO $pdo)
    {
        // Remove foreign key constraints from hardwares_settings_events
        $sql = "
            ALTER TABLE `hardwares_settings_events`
            ADD COLUMN `property_id` INT DEFAULT NULL AFTER `eventOf`;
        ";
        $pdo->exec($sql);
    }

    public static function down(PDO $pdo)
    {
        // Remove `property_id` column
        $sql = "
            ALTER TABLE `hardwares_settings_events`
            DROP COLUMN `property_id`;
        ";
        $pdo->exec($sql);
    }
}