Bugfix database definitions / patches after last change.

This commit is contained in:
Andrew McMillan 2009-10-27 17:31:22 +13:00
parent cf6224374e
commit 0bd0fbca85
2 changed files with 6 additions and 4 deletions

View File

@ -280,9 +280,10 @@ CREATE TABLE grants (
by_collection INT8 REFERENCES collection(collection_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
to_principal INT8 REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
privileges BIT(24),
is_group BOOLEAN,
PRIMARY KEY (dav_name, to_principal)
is_group BOOLEAN
) WITHOUT OIDS;
CREATE UNIQUE INDEX grants_pk1 ON grants(by_principal,to_principal);
CREATE UNIQUE INDEX grants_pk2 ON grants(by_collection,to_principal);
CREATE TABLE sync_tokens (

View File

@ -548,9 +548,10 @@ CREATE TABLE grants (
by_collection INT8 REFERENCES collection(collection_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
to_principal INT8 REFERENCES principal(principal_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
privileges BIT(24),
is_group BOOLEAN,
PRIMARY KEY (dav_name, to_principal)
is_group BOOLEAN
) WITHOUT OIDS;
CREATE UNIQUE INDEX grants_pk1 ON grants(by_principal,to_principal);
CREATE UNIQUE INDEX grants_pk2 ON grants(by_collection,to_principal);
INSERT INTO grants ( by_principal, to_principal, privileges, is_group )