diff options
author | Russ Allbery <rra@stanford.edu> | 2011-06-20 16:15:35 -0700 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2011-06-20 16:15:35 -0700 |
commit | 74ed6945f9c7839603764327f0187897525db453 (patch) | |
tree | 508af8902a66e5259d376637fdbd72979d5d22a3 /perl/Wallet/Schema.pm | |
parent | 99423b393c0f64ad657fe4fca7ec9aa2cd2a34be (diff) |
Add a comment field to objects
Add a comment field to objects and corresponding commands to
wallet-backend and wallet to set and retrieve it. The comment field
can only be set by the owner or wallet administrators but can be seen
by anyone on the show ACL.
Diffstat (limited to 'perl/Wallet/Schema.pm')
-rw-r--r-- | perl/Wallet/Schema.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/perl/Wallet/Schema.pm b/perl/Wallet/Schema.pm index 0f6c53f..7400776 100644 --- a/perl/Wallet/Schema.pm +++ b/perl/Wallet/Schema.pm @@ -145,7 +145,9 @@ sub upgrade { return; } elsif ($version == 0) { @sql = ('create table metadata (md_version integer)', - 'insert into metadata (md_version) values (1)'); + 'insert into metadata (md_version) values (1)', + 'alter table objects add ob_comment varchar(255) default null' + ); } else { die "unknown database version $version\n"; } @@ -367,6 +369,7 @@ table: ob_downloaded_by varchar(255) default null, ob_downloaded_from varchar(255) default null, ob_downloaded_on datetime default null, + ob_comment varchar(255) default null, primary key (ob_name, ob_type)); create index ob_owner on objects (ob_owner); create index ob_expires on objects (ob_expires); |