Juan Hernandez has posted comments on this change.
Change subject: core, restapi: Add DbGroup
......................................................................
Patch Set 19:
(4 comments)
....................................................
File packaging/dbscripts/upgrade/03_04_0160_add_external_id_to_groups.sql
Line 1: -- Add a column to the groups table to store the identifier assigned by
the
Line 2: -- external directory. This new comlumn is initialized with a copy of
the
Done
Line 3: -- identifier of the group, as before this change we used the external
Line 4: -- identifier also as internal identifier.
Line 5:
Line 6: create or replace function __temp_add_external_id_to_groups() returns
void
Line 5:
Line 6: create or replace function __temp_add_external_id_to_groups() returns
void
Line 7: as $function$
Line 8: begin
Line 9: if (not exists (select 1 from information_schema.columns where
table_name ilike 'ad_groups' and column_name ilike 'external_id')) then
Done
Line 10: alter table ad_groups add column external_id bytea not null
default '';
Line 11: update ad_groups set external_id = decode(replace(id::text, '-',
''), 'hex');
Line 12: perform fn_db_create_constraint('ad_groups',
'groups_domain_external_id_unique', 'unique (domain, external_id)');
Line 13: end if;
....................................................
File
packaging/dbscripts/upgrade/03_04_0170_rename_user_and_group_status_to_active.sql
Line 5: create or replace function
__temp_rename_user_and_group_status_to_active() returns void
Line 6: as $function$
Line 7: begin
Line 8: -- Update the users table:
Line 9: if (not exists (select 1 from information_schema.columns where
table_name ilike 'users' and column_name ilike 'active')) then
Done
Line 10: alter table users add column active boolean not null default false;
Line 11: update users set active = status::boolean;
Line 12: alter table users drop column status;
Line 13: end if;
Line 12: alter table users drop column status;
Line 13: end if;
Line 14:
Line 15: -- Update the groups table:
Line 16: if (not exists (select 1 from information_schema.columns where
table_name ilike 'ad_groups' and column_name ilike 'active')) then
Done
Line 17: alter table ad_groups add column active boolean not null default
false;
Line 18: update ad_groups set active = status::boolean;
Line 19: alter table ad_groups drop column status;
Line 20: end if;
--
To view, visit http://gerrit.ovirt.org/17544
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Idb1a7146c29eb74f97e10043d65b5a67f1430021
Gerrit-PatchSet: 19
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Martin Peřina <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: mooli tayer <[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