-- Migration 143: server_config modpack installer columns (Task #101)
-- Adds fields for modpack tracking, version locking, RAM scaling, hibernation.

ALTER TABLE server_config
ADD COLUMN IF NOT EXISTS modpack_provider VARCHAR(50),
ADD COLUMN IF NOT EXISTS modpack_id VARCHAR(100),
ADD COLUMN IF NOT EXISTS current_version_id VARCHAR(100),
ADD COLUMN IF NOT EXISTS is_version_locked BOOLEAN DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS locked_version_id VARCHAR(100) DEFAULT NULL,
ADD COLUMN IF NOT EXISTS lock_reason TEXT DEFAULT NULL,
ADD COLUMN IF NOT EXISTS spawn_verified BOOLEAN DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS ram_allocation_mb INT NOT NULL DEFAULT 8192,
ADD COLUMN IF NOT EXISTS ram_ceiling_mb INT NOT NULL DEFAULT 16384,
ADD COLUMN IF NOT EXISTS hibernation_status VARCHAR(50) DEFAULT 'active';
