]> git.wh0rd.org - tt-rss.git/commitdiff
entry comments schema
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 20 Nov 2005 18:06:06 +0000 (19:06 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 20 Nov 2005 18:06:06 +0000 (19:06 +0100)
schema/ttrss_schema_mysql.sql
schema/ttrss_schema_pgsql.sql

index 885ac488fc2cfd1289c825a6bf56bdd5979bce2b..bb311bcc0bdfdf12b5e46e500a488aabb00a9b06 100644 (file)
@@ -1,6 +1,7 @@
 drop table if exists ttrss_tags;
 
 drop table if exists ttrss_user_entries;
+drop table if exists ttrss_entry_comments;
 drop table if exists ttrss_entries;
 
 drop table if exists ttrss_feeds;
@@ -66,6 +67,16 @@ create table ttrss_user_entries (
        index (owner_uid),
        foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) TYPE=InnoDB;
 
+create table ttrss_entry_comments (id integer not null primary key,
+       ref_id integer not null,
+       owner_uid integer not null,
+       private bool not null default 0,
+       date_entered datetime not null,
+       index (ref_id),
+       foreign key (ref_id) references ttrss_entries(id) ON DELETE CASCADE,
+       index (owner_uid),
+       foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) TYPE=InnoDB;
+
 drop table if exists ttrss_filters;
 drop table if exists ttrss_filter_types;
 
index 4a31733671f5cd5ccc570974868278b8801c57a0..a9befdce8950b3b831aae6e57ea36700c2091cec 100644 (file)
@@ -1,6 +1,7 @@
 drop table ttrss_tags;
 
 drop table ttrss_user_entries;
+drop table ttrss_entry_comments;
 drop table ttrss_entries;
 
 drop table ttrss_feeds;
@@ -67,6 +68,15 @@ create index ttrss_user_entries_feed_id_index on ttrss_user_entries(feed_id);
 create index ttrss_user_entries_owner_uid_index on ttrss_user_entries(owner_uid);
 create index ttrss_user_entries_ref_id_index on ttrss_user_entries(ref_id);
 
+create table ttrss_entry_comments (id serial not null primary key,
+       ref_id integer not null references ttrss_entries(id) ON DELETE CASCADE,
+       owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
+       private boolean not null default false,
+       date_entered timestamp not null);
+       
+create index ttrss_entry_comments_ref_id_index on ttrss_entry_comments(ref_id);
+create index ttrss_entry_comments_owner_uid_index on ttrss_entry_comments(owner_uid);
+
 drop table ttrss_filters;
 drop table ttrss_filter_types;