core: Fix temproaral disabling foreign keys

The temporal disabling of foreign keys did not work
causing upgrade to fail

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1091227
Change-Id: I2fafc5c18bf07c5bef9805d2bfd8c4590ba226f8
Signed-off-by: Yair Zaslavsky <yzaslavs@redhat.com>