Re-enables foreign key checks. Fixes #8 #9

Merged
merged 1 commit into from Sep 17, 2012

3 participants

@amir20

No description provided.

@amir20

@mdgreenfield Try using version 1.5-SNAPSHOT and see if that works.

@mdgreenfield

looks good now.

@mdgreenfield mdgreenfield merged commit 6e813f2 into opower:master Sep 17, 2012
@s-machina

Should this be done all the time? Or should it be configurable. Better yet, should it check the current db settings before doing it. Some dbs run without foreign key checks. Not ours I suppose, but many do.

My opinion is that the connection should undo whatever it did before with the connection. I initially set the fk check to false so it only makes to restore it to true.

I agree. What I'm saying is what if they db had foreign_key_check = 0 prior to you setting it to 0 yourself.

@amir20

I see, that makes sense. I didn't think someone would disable fk check before. But I could see why it would break if they did. I'll add that to 1.6. Or accept pull requests. :P

@mdgreenfield 1.5 is ready in maven.

@s-machina

Touché.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment