]> git.wh0rd.org - tt-rss.git/blobdiff - schema/ttrss_schema_mysql.sql
add ttrss_archived_feeds (MODIFY SCHEMA v60)
[tt-rss.git] / schema / ttrss_schema_mysql.sql
index c6de602878d480ed2255db022b82e3467c5d0eeb..68611c94e13c890cbf25afafdf536177f3b4dbac 100644 (file)
@@ -22,6 +22,7 @@ drop table if exists ttrss_scheduled_updates;
 drop table if exists ttrss_counters_cache;
 drop table if exists ttrss_cat_counters_cache;
 drop table if exists ttrss_feeds;
+drop table if exists ttrss_archived_feeds;
 drop table if exists ttrss_feed_categories;
 drop table if exists ttrss_users;
 drop table if exists ttrss_themes;
@@ -62,6 +63,14 @@ create table ttrss_feed_categories(id integer not null primary key auto_incremen
        index(owner_uid),
        foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) TYPE=InnoDB;
 
+create table ttrss_archived_feeds (id integer not null primary key,
+       owner_uid integer not null,
+       title varchar(200) not null, 
+       feed_url text not null, 
+       site_url varchar(250) not null default '',
+       index(owner_uid),
+       foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) TYPE=InnoDB;
+
 create table ttrss_counters_cache (
        feed_id integer not null,
        owner_uid integer not null,
@@ -147,7 +156,7 @@ create table ttrss_user_entries (
        index (feed_id),
        foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE,
        index (orig_feed_id),
-       foreign key (orig_feed_id) references ttrss_feeds(id) ON DELETE SET NULL,
+       foreign key (orig_feed_id) references ttrss_archived_feeds(id) ON DELETE SET NULL,
        index (owner_uid),
        foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) TYPE=InnoDB;