diff options
author | Russ Allbery <rra@stanford.edu> | 2007-08-30 00:30:34 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-08-30 00:30:34 +0000 |
commit | 2e7b886b16e2e0adf723ac59efa715e15bb2e519 (patch) | |
tree | 4492b4ca7ece95aa0c2b7779fe37f1b48e483586 /perl/Wallet/Schema.pm | |
parent | 9c24f5325524066d98a600215246bf990313f0e3 (diff) |
Fix all the interfaces so that objects are identified as type, name, not
name, type, and fix the schema for the places where I'd renamed name to
object for no good reason. I don't know what I was thinking originally.
Diffstat (limited to 'perl/Wallet/Schema.pm')
-rw-r--r-- | perl/Wallet/Schema.pm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/perl/Wallet/Schema.pm b/perl/Wallet/Schema.pm index 3538ef4..3c8cbe1 100644 --- a/perl/Wallet/Schema.pm +++ b/perl/Wallet/Schema.pm @@ -238,9 +238,9 @@ Each object stored in the wallet is represented by an entry in the objects table: create table objects - (ob_name varchar(255) not null, - ob_type varchar(16) + (ob_type varchar(16) not null references types(ty_name), + ob_name varchar(255) not null, ob_owner integer default null references acls(ac_id), ob_acl_get integer default null references acls(ac_id), ob_acl_store integer default null references acls(ac_id), @@ -271,23 +271,23 @@ The ob_acl_flags ACL controls who can set flags on this object. Each object may have zero or more flags associated with it: create table flags - (fl_object varchar(255) - not null references objects(ob_name), - fl_type varchar(16) + (fl_type varchar(16) not null references objects(ob_type), + fl_name varchar(255) + not null references objects(ob_name), fl_flag varchar(32) not null references flag_names(fn_name)); - create index fl_object on flags (fl_object, fl_type); + create index fl_object on flags (fl_type, fl_name); Every change made to any object in the wallet database will be recorded in this table: create table object_history (oh_id integer auto_increment primary key, - oh_object varchar(255) - not null references objects(ob_object), oh_type varchar(16) not null references objects(ob_type), + oh_name varchar(255) + not null references objects(ob_object), oh_action varchar(16) not null, oh_field varchar(16) default null, oh_type_field varchar(255) default null, @@ -296,7 +296,7 @@ this table: oh_by varchar(255) not null, oh_from varchar(255) not null, oh_on datetime not null); - create index oh_object on object_history (oh_object, oh_type); + create index oh_object on object_history (oh_type, oh_name); oh_action must be one of C<create>, C<destroy>, C<get>, C<store>, or C<set>. oh_field must be one of C<owner>, C<acl_get>, C<acl_store>, C<acl_show>, |