-- Fix server_backups table - add missing columns
-- Run this if you already created the table with the old schema

ALTER TABLE server_backups ADD COLUMN IF NOT EXISTS name VARCHAR(100);
ALTER TABLE server_backups ADD COLUMN IF NOT EXISTS description TEXT;
ALTER TABLE server_backups ADD COLUMN IF NOT EXISTS backup_type VARCHAR(20) DEFAULT 'manual';
ALTER TABLE server_backups ADD COLUMN IF NOT EXISTS roles_count INTEGER DEFAULT 0;
ALTER TABLE server_backups ADD COLUMN IF NOT EXISTS channels_count INTEGER DEFAULT 0;
ALTER TABLE server_backups ADD COLUMN IF NOT EXISTS size_bytes BIGINT DEFAULT 0;

CREATE INDEX IF NOT EXISTS idx_server_backups_guild ON server_backups(guild_id);
