<?php

class Migration_20250814003816_dynamic_base_costs
{
    public static function up(PDO $pdo)
    {
        $pdo->exec("
            CREATE TABLE dynamic_base_costs (
                id INT AUTO_INCREMENT PRIMARY KEY,
                property_id INT NOT NULL,
                sub_fee VARCHAR(10) DEFAULT '0',
                camera_add VARCHAR(10) DEFAULT '0',
                number_add VARCHAR(10) DEFAULT '0',
                door_add VARCHAR(10) DEFAULT '0',
                msrp_sub_fee VARCHAR(10) DEFAULT '0',
                msrp_camera_add VARCHAR(10) DEFAULT '0',
                msrp_number_add VARCHAR(10) DEFAULT '0',
                msrp_door_add VARCHAR(10) DEFAULT '0',
                is_active Boolean DEFAULT 1,
                created_at DATETIME DEFAULT CURRENT_TIMESTAMP
            )
        ");
    }

    public static function down(PDO $pdo)
    {
        $pdo->exec("DROP TABLE IF EXISTS dynamic_base_costs");
    }
}