Yair Zaslavsky has posted comments on this change.

Change subject: aaa: Change API to 3.3 behavior
......................................................................


Patch Set 10:

(2 comments)

http://gerrit.ovirt.org/#/c/25997/10/packaging/dbscripts/upgrade/03_05_0150_change_group_ids.sql
File packaging/dbscripts/upgrade/03_05_0150_change_group_ids.sql:

Line 11:        substring(encode(external_id,'hex') FROM 17 FOR 4) || '-' ||
Line 12:        substring(encode(external_id,'hex') FROM 21 FOR 12) AS uuid);
Line 13: 
Line 14: --2. Changing relevant group_id appearances in other tables
Line 15: ALTER TABLE tags_user_group_map DROP constraint 
"tags_user_map_user_group";
> Instead of drop/create , you can do here 
TRIGGGER all did not work,
But TRIGGER USER did.
Line 16: 
Line 17: UPDATE tags_user_group_map m set group_id = (
Line 18:        SELECT temp_id FROM ad_groups WHERE id = m.group_id
Line 19: );


Line 24:        SELECT id from ad_groups where id =  p.ad_element_id
Line 25: );
Line 26: 
Line 27: --3. Fixing group_ids at users
Line 28: CREATE temp TABLE tmp_users_groups AS
> Please add : ON COMMIT DROP to ensure that table is dropped at the end of t
I assume all the script does not run in single transaction.
When I tried this, I got the followiing error -
ERROR:  relation "tmp_users_groups" does not exist

I will need to wrap this with a function probably, or open a transaction 
manually in the script, right? (just verified - works with a wrapping function)
Line 29:        SELECT fnsplitteruuid(group_ids) as group_id, user_id from 
users;
Line 30: UPDATE tmp_users_groups t SET group_id = (
Line 31:        SELECT temp_id FROM ad_groups WHERE id = t.group_id
Line 32: );


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iff51fb9df33b4b679eba5b1c3ef2bea6ea7b3e07
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to