Gilad Chaplik has posted comments on this change. Change subject: engine: Move quota to Image_storage_domain_map ......................................................................
Patch Set 5: (2 comments) .................................................... File packaging/dbscripts/upgrade/03_04_0050_move_quota_id.sql Line 1: -- add quota id column to the image-storage map table Line 2: SELECT fn_db_add_column('image_storage_domain_map','quota_id', 'UUID NULL'); Line 3: -- create a FK to quota table to that column Line 4: ALTER TABLE image_storage_domain_map ADD CONSTRAINT fk_image_storage_domain_map_quota FOREIGN KEY (quota_id) REFERENCES quota(id) ON DELETE SET NULL; Done Line 5: -- copy old quota from images table Line 6: UPDATE image_storage_domain_map SET quota_id = (SELECT quota_id FROM images WHERE image_id = image_guid); Line 7: -- remove quota_id column from images table Line 4: ALTER TABLE image_storage_domain_map ADD CONSTRAINT fk_image_storage_domain_map_quota FOREIGN KEY (quota_id) REFERENCES quota(id) ON DELETE SET NULL; Line 5: -- copy old quota from images table Line 6: UPDATE image_storage_domain_map SET quota_id = (SELECT quota_id FROM images WHERE image_id = image_guid); Line 7: -- remove quota_id column from images table Line 8: ALTER TABLE images DROP column quota_id; Done -- To view, visit http://gerrit.ovirt.org/20097 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icc81b077cf125de85fcb3586bc0d0f71e5e0716a Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches