-- Driver self-service Aadhaar (12 digits). Idempotent if column already exists (e.g. from fresh schema load).
SET @exists := (
  SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
  WHERE TABLE_SCHEMA = DATABASE()
    AND TABLE_NAME = 'fleet_drivers'
    AND COLUMN_NAME = 'aadhaar'
);
SET @sql := IF(
  @exists = 0,
  'ALTER TABLE fleet_drivers ADD COLUMN aadhaar VARCHAR(12) NULL COMMENT ''12-digit UID'' AFTER mobile',
  'SELECT 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
