X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;ds=sidebyside;f=schema.sql;h=850e6a9ace316196a494d7a91b77a95f7c21ceb0;hb=b41d7697d060b3675ae160ef8b88c51e642b0c99;hp=8529e32725977f50c1ab0722574cc97d3d6144db;hpb=0546d239071daa82a8b85348a7f66fba10d85aff;p=cumulus.git diff --git a/schema.sql b/schema.sql index 8529e32..850e6a9 100644 --- a/schema.sql +++ b/schema.sql @@ -19,7 +19,8 @@ create table segments ( path text, checksum text, mtime real, - size integer + size integer, + expire_time integer -- snapshotid of latest snapshot when expired ); -- Index of all blocks which have been stored, by checksum. @@ -46,8 +47,8 @@ create unique index segments_used_index -- Overall estimate of segment utilization, for all snapshots combined. create view segment_info as -select segmentid, mtime, size, cast(size * utilization as integer) as used, - utilization +select segmentid, mtime, size, expire_time, + cast(size * utilization as integer) as used, utilization from segments join (select segmentid, max(utilization) as utilization from segments_used group by segmentid)