Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

fix constraint drops

  • Loading branch information
bgaya committed Dec 19, 2013
1 parent e4b9bb8 commit 58a0cb5c3faab947028d5a7926f03ba278644c4c
@@ -22,18 +22,21 @@
-- Change Address Book Object Members --
----------------------------------------

alter table ABO_MEMBERS
drop ("abo_members_member_id_fkey");
alter table ABO_MEMBERS
drop ("abo_members_group_id_fkey");
begin
for i in (select constraint_name from abo_members where column_name = 'MEMBER_ID' or column_name = 'GROUP_ID')
loop
execute immediate 'alter table abo_members constraint' || i.constraint_name;
end loop;
end;

alter table ABO_MEMBERS
add ("REVISION" integer default nextval('REVISION_SEQ') not null);
alter table ABO_MEMBERS
add ("REMOVED" boolean default false not null);
alter table ABO_MEMBERS
drop ("abo_members_pkey");
drop primary key;
alter table ABO_MEMBERS
add ("abo_members_pkey" primary key ("GROUP_ID", "MEMBER_ID", "REVISION"));
add primary key ("GROUP_ID", "MEMBER_ID", "REVISION");

------------------------------------------
-- Change Address Book Object Revisions --

0 comments on commit 58a0cb5

Please sign in to comment.
You can’t perform that action at this time.