diff options
author | Russ Allbery <rra@stanford.edu> | 2007-08-28 18:19:22 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-08-28 18:19:22 +0000 |
commit | 43fd7cb9bca3b7521d2729d0e81fbc66c788212c (patch) | |
tree | 2d7399c22816f1ff613295956dab9e3c83b77343 /docs | |
parent | d69c917ca3656481802e8a41177e4e73f04bd054 (diff) |
Use acl_entries, not acl_entry, for the ACL table to match the
pluralization of other table names. Add indexes and uniqueness
constraints and fix the object_history primary key.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/design-schema | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/docs/design-schema b/docs/design-schema index 648c367..8e04f49 100644 --- a/docs/design-schema +++ b/docs/design-schema @@ -35,7 +35,9 @@ Object Metadata ob_downloaded_by varchar(255) default null, ob_downloaded_from varchar(255) default null, ob_downloaded_on datetime default null, - primary key (ob_name, ob_type)); + primary key (ob_name, ob_type), + index (ob_owner), + index (ob_expires)); Object names are not globally unique but only unique within their type, so the table has a joint primary key. I haven't yet decided @@ -47,12 +49,13 @@ Object Metadata create table acls (ac_id integer auto_increment primary key, - ac_name varchar(255) not null); + ac_name varchar(255) not null, + unique index (ac_name)); This just keeps track of unique ACL identifiers. The data is then stored in: - create table acl_entry + create table acl_entries (ae_id integer not null references acls(ac_id), ae_scheme varchar(32) @@ -91,7 +94,7 @@ Object Metadata oh_by varchar(255) not null, oh_from varchar(255) not hull, oh_on datetime not null, - primary key (oh_object, oh_type)); + index (oh_object, oh_type)); For a change of type create, get, store, or destroy, only the action and the trace records (by, from, and on) are stored. For changes to @@ -114,7 +117,8 @@ Object Metadata ah_identifier varchar(255), ah_by varchar(255) not null, ah_from varchar(255) not null, - ah_on datetime not null); + ah_on datetime not null, + index (ah_acl)); For a change of type create or destroy, only the action and the trace records (by, from, and on) are stored. For a change to the lines of |