SELECT fn_db_drop_constraint('user_groups', 'user_groups_in_group_id_fkey');
SELECT fn_db_create_constraint('user_groups', 'user_groups_in_group_id_fkey', 'FOREIGN KEY (in_group_id) REFERENCES aaa_jdbc.groups (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE');
SELECT fn_db_drop_constraint('group_groups', 'group_groups_in_group_id_fkey');
SELECT fn_db_create_constraint('group_groups', 'group_groups_in_group_id_fkey', 'FOREIGN KEY (in_group_id) REFERENCES aaa_jdbc.groups (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE');

SELECT fn_db_drop_constraint('user_groups', 'user_groups_in_group_id_fkey');
SELECT fn_db_create_constraint('user_groups', 'user_groups_in_group_id_fkey', 'FOREIGN KEY (in_group_id) REFERENCES groups (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE');
SELECT fn_db_drop_constraint('group_groups', 'group_groups_in_group_id_fkey');
SELECT fn_db_create_constraint('group_groups', 'group_groups_in_group_id_fkey', 'FOREIGN KEY (in_group_id) REFERENCES groups (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE');

Remove aaa_jdbc schema name from upgrade script
db: Remove aaa_jdbc schema name from upgrade script

Removes aaa_jdbc schema name from upgrade script, so upgrade script
works also for different schema names, which can be specified as command
line option for schema.sh. The error was introduced in patch
I08f2441600a19696c25a03f9cfed4fe39a449fa6.

Change-Id: If68e1068abf6848ef241aa4a84eebc7d9eb542f0
Bug-Url: http://bugzilla.redhat.com/1241883
Signed-off-by: Martin Perina <7bf83f5b771f1cc16b652b5fe02fa33310bda7b0@redhat.com>
