X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=remove_ou_data%2F00_check_admin_user.sql;fp=remove_ou_data%2F00_check_admin_user.sql;h=3702ba74ca8b7dcc2117428603880202ba53e887;hp=6d6eb9d96639d22b1ea3b388c3e1122b815235e0;hb=d1ba7e34fbccf0ce88658767460ed9914b3994b8;hpb=18a02757bcb86606230897b56622fb13110d6681 diff --git a/remove_ou_data/00_check_admin_user.sql b/remove_ou_data/00_check_admin_user.sql index 6d6eb9d..3702ba7 100644 --- a/remove_ou_data/00_check_admin_user.sql +++ b/remove_ou_data/00_check_admin_user.sql @@ -20,11 +20,12 @@ \timing -- these scripts assume that the admin user's home_ou is 1, if not there can be problems +-- replace 'equinox' with the appropriate admin name DO $$ DECLARE x INTEGER; BEGIN - SELECT home_ou FROM actor.usr INTO x; + SELECT home_ou FROM actor.usr WHERE usrname = 'equinox' INTO x; IF x != 1 THEN RAISE EXCEPTION 'Admin user is not home org of 1'; END IF; END $$;