<?php

class Migration_20250114162118_update_sidebar_icons
{
    public static function up(PDO $pdo)
    {
        $sql="
            UPDATE resources SET icon = 'fa-solid fa-chart-area' WHERE name = 'dashboard';
            UPDATE resources SET icon = 'fa-solid fa-qrcode' WHERE name = 'my_iis';
            UPDATE resources SET icon = 'fa-solid fa-building' WHERE name = 'my_properties';
            UPDATE resources SET icon = 'fa-solid fa-gears' WHERE name = 'integrations';
            UPDATE resources SET icon = 'fa-solid fa-users' WHERE name = 'users';
            UPDATE resources SET icon = 'fa-regular fa-id-badge' WHERE name = 'visitors';
            UPDATE resources SET icon = 'fa-solid fa-gamepad' WHERE name = 'command_center';
            UPDATE resources SET icon = 'fa-solid fa-calendar-days' WHERE name = 'events';
            UPDATE resources SET icon = 'fa-solid fa-screwdriver-wrench' WHERE name = 'property_builder';
        ";

        $pdo->exec($sql);
    }

    public static function down(PDO $pdo)
    {
        $sql="
            UPDATE resources SET icon = 'far fa-regular fa-user' WHERE name = 'dashboard';
            UPDATE resources SET icon = 'far fa-solid fa-phone' WHERE name = 'my_iis';
            UPDATE resources SET icon = 'fa-solid fa-address-book' WHERE name = 'my_properties';
            UPDATE resources SET icon = 'far fa-solid fa-toolbox' WHERE name = 'integrations';
            UPDATE resources SET icon = 'far fa-solid fa-key' WHERE name = 'users';
            UPDATE resources SET icon = 'far fa-solid fa-unlock-keyhole' WHERE name = 'visitors';
            UPDATE resources SET icon = 'far fa-solid fa-gamepad' WHERE name = 'command_center';
            UPDATE resources SET icon = 'far fa-solid fa-clipboard-list' WHERE name = 'events';
            UPDATE resources SET icon = 'far fa-solid fa-gears' WHERE name = 'property_builder';
        ";

        $pdo->exec($sql);
    }
}