/[webpac2]/trunk/sql/schema.sql
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/sql/schema.sql

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 24 by dpavlin, Sat Jul 23 15:46:24 2005 UTC revision 27 by dpavlin, Sat Jul 23 19:21:07 2005 UTC
# Line 9  create table catalogs ( Line 9  create table catalogs (
9    
10  create table catalog_webarchive (  create table catalog_webarchive (
11          uri     text not null,                  -- unique index          uri     text not null,                  -- unique index
12          last_crawled timestamp          last_crawled timestamp,
13            primary key(id)
14  ) inherits (catalogs) ;  ) inherits (catalogs) ;
15    
16  -- Entries in Catalog  -- Entries in Catalog
# Line 28  create table catalog_entry ( Line 29  create table catalog_entry (
29          primary key (catalog_id, entry_id)          primary key (catalog_id, entry_id)
30  );  );
31    
32  -- Pg General Bits entries  -- Items for each Entry
 create table entries_pgbits (  
         issue   int not null                    -- unique index  
 ) inherits (entries) ;  
   
 -- Items in Entries  
33  create table items (  create table items (
34          id      serial,          id      serial,
35          title   text,          title   text,
# Line 48  create table items ( Line 44  create table items (
44  create table items_est (  create table items_est (
45          path    text,                   -- unique index          path    text,                   -- unique index
46          uri     text not null,          -- unique index          uri     text not null,          -- unique index
47          size    int          size    int,
48            primary key(id)
49  ) inherits (items) ;  ) inherits (items) ;
50    
51  -- Tags for Entries  -- Tags for Entries
# Line 68  create table entry_tag ( Line 65  create table entry_tag (
65          primary key (entry_id, tag_id)          primary key (entry_id, tag_id)
66  );  );
67    
68    -- Pg General Bits
69    create table entries_pgbits (
70            issue   int not null,                   -- unique index
71            primary key(id)
72    ) inherits (entries) ;
73    
74    create table items_pgbits (
75            mytitle text not null,
76            ititle  text not null,
77            ikey    text,
78            html    text,
79            contributors text,
80            primary key(id)
81    ) inherits (items) ;
82    
83    -- some views
84    
85    create view pgbits_articles as select
86            issue,
87            entries_pgbits.date as issue_date,
88            ititle,
89            mytitle,
90            items_pgbits.date as date
91    from items_pgbits
92    join entries_pgbits on entry_id = entries_pgbits.id ;
93    

Legend:
Removed from v.24  
changed lines
  Added in v.27

  ViewVC Help
Powered by ViewVC 1.1.26