Make NIO categories migration idempotent