They mean the same. The first is past subjunctive mood. It is used here because it speaks of something the person did not imagine would happen. Here's another example: if you are having dinner with someone and you see him eating fish, you could say "I didn't know you ATE fish". You could also use the ordinary present tense: "I didn't know that you eat fish". The difference is that the first way expresses more surprise. The subjunctive mood expresses that he eat fish was outside his imagination.