[{"/app/bootstrap.php":"use AppCoreDatabase;\n\ntry {\n    $pdo = Database::getConnection();\n\n    echo","Migrations":"Telegram Bot Integration ===","\n        CREATE TABLE IF NOT EXISTS `telegram_sessions` (\n          `id` INT AUTO_INCREMENT PRIMARY KEY,\n          `company_id` INT NOT NULL,\n          `name` VARCHAR(255) NOT NULL COMMENT 'e.g., Support Bot, Sales Bot',\n          `bot_token` TEXT NOT NULL COMMENT 'Encrypted using AES-256-GCM',\n          `bot_username` VARCHAR(255) DEFAULT NULL,\n          `bot_id` BIGINT DEFAULT NULL COMMENT 'Telegram Bot ID from getMe',\n          `webhook_url` TEXT DEFAULT NULL,\n          `status` ENUM('connected', 'disconnected', 'error') DEFAULT 'disconnected',\n          `allowed_updates` JSON DEFAULT NULL COMMENT 'Array of update types to receive',\n          `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n          `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\n          FOREIGN KEY (`company_id`) REFERENCES `companies`(`id`) ON DELETE CASCADE,\n          UNIQUE KEY `company_bot_unique` (`company_id`, `bot_username`)\n        ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;":"Database::execute($createSessionsTableSql);\n    echo","telegram_sessions":"erified/created.","Database":"select(","telegram_session_id":"if (empty($columns)) {\n        Database::execute(","meta_session_id`":"Database::execute(","✅ Added 'telegram_session_id' column and foreign key constraint to 'messages_log'.":""},{"ℹ️ Column 'telegram_session_id' already exists in 'messages_log'. Skipping.":""},{"Database":"execute(","session_id`":"Database::execute(","✅ Added 'telegram_session_id' column to 'chatbot_rules'.":""},{"ℹ️ Column 'telegram_session_id' already exists in 'chatbot_rules'. Skipping.":""},{"Database":"execute(","company_id`":"Database::execute(","✅ Added 'telegram_session_id' column to 'conversation_states'.":""},{"ℹ️ Column 'telegram_session_id' already exists in 'conversation_states'. Skipping.":""},{"Database":"execute(","✅ Added 'telegram_requests' column to 'company_subscription_usage'.":""},{"ℹ️ Column 'telegram_requests' already exists in 'company_subscription_usage'. Skipping.":""},{"❌ Migration error: \" . $e->getMessage() . \"":""}]