Change in ovirt-engine[master]: core: deleted trigger on db upgrade

laravot at redhat.com laravot at redhat.com
Thu Jul 3 12:26:45 UTC 2014


Liron Aravot has submitted this change and it was merged.

Change subject: core: deleted trigger on db upgrade
......................................................................


core: deleted trigger on db upgrade

The upgrade script 03_05_0730_drop_disk_image_dynamic_fk.sql replaces
the use of a cascade delete of a foregin key with a trigger.
When performing a further update to the db, the functions are being
deleted with CASCADE, which will cause the trigger and the function
to be deleted and never be added again.

The quick solution is to move the trigger/function creation to
disk_image_dynamic_sp as we currently don't have any trigger creation
infrastructure after update is performed.

Upgrade script is provided as well to perform cleanup of orphand records
that might have been left in disk_image_dynamic.

Change-Id: I594cddb968795a5a6a0d04e2c6bed9002c025ef9
Signed-off-by: Liron Aravot <laravot at redhat.com>
---
M packaging/dbscripts/disk_image_dynamic_sp.sql
A packaging/dbscripts/upgrade/03_05_0750_delete_orphand_disk_image_dynamic_records.sql
2 files changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Maor Lipchuk: Looks good to me, approved
  Liron Aravot: Verified



-- 
To view, visit http://gerrit.ovirt.org/29547
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I594cddb968795a5a6a0d04e2c6bed9002c025ef9
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list