FIX: Use `cmd_tuples` instead of checking row index for migration.