From: Michael Vrable Date: Fri, 10 Aug 2007 17:23:51 +0000 (-0700) Subject: Minor database schema fix. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=7cbc7cce1bbaaa761e800405feeed3b6383ce17c;p=cumulus.git Minor database schema fix. When constructing the segment_info view, we can no longer do a natural join on the block_index and segments tables, since the segments table recently acquired a checksum column. Now explicitly join on the segmentid column only, which is the desired behavior (and what a natural join used to do). --- diff --git a/schema.sql b/schema.sql index a37b501..2cca99a 100644 --- a/schema.sql +++ b/schema.sql @@ -44,7 +44,7 @@ create unique index snapshot_contents_unique create view segment_info as select * from (select segmentid, max(timestamp) as mtime, sum(size) as size, count(*) as objects - from block_index natural join segments group by segmentid) + from block_index join segments using (segmentid) group by segmentid) natural join (select segmentid, sum(size) as used, count(*) as objects_used from block_index where blockid in