When using wish, the tenses ‘go backwards’.

Current Wishes: Although the wish is for something now, the grammar uses the past tense.

I wish I don’t have homework.

I wish she is my girlfriend.

I wish I can do magic.

I wish I didn’t have homework.

I wish she was my girlfriend. 

I wish I could do magic.

Past Wishes

Past Wishes: Wishes in the past have to use the past perfect tense (had done/eaten/gone etc).

I wish I studied harder when I was at school.

I wish I had studied harder when I was at school.

She wishes she didn’t kiss him.

She wishes she hadn’t kissed him.

He wishes he didn’t get drunk at the bar and acted stupidly in front of the staff.

He wishes he hadn’t got drunk at the bar and acted stupidly in front of the staff.