add parent_feed column to ttrss_feeds, create upgrade script for 1.1.1, move out old scripts to schema/obsolete
This commit is contained in:
parent
09829e2a32
commit
de99f5005d
7 changed files with 18 additions and 2 deletions
|
@ -54,10 +54,13 @@ create table ttrss_feeds (id integer not null auto_increment primary key,
|
||||||
site_url varchar(250) not null default '',
|
site_url varchar(250) not null default '',
|
||||||
auth_login varchar(250) not null default '',
|
auth_login varchar(250) not null default '',
|
||||||
auth_pass varchar(250) not null default '',
|
auth_pass varchar(250) not null default '',
|
||||||
|
parent_feed integer default null,
|
||||||
index(owner_uid),
|
index(owner_uid),
|
||||||
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
|
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
|
||||||
index(cat_id),
|
index(cat_id),
|
||||||
foreign key (cat_id) references ttrss_feed_categories(id)) TYPE=InnoDB;
|
foreign key (cat_id) references ttrss_feed_categories(id),
|
||||||
|
index(parent_feed),
|
||||||
|
foreign key (parent_feed) references ttrss_feeds(id) ON DELETE SET NULL) TYPE=InnoDB;
|
||||||
|
|
||||||
insert into ttrss_feeds (owner_uid,title,feed_url) values (1,'Footnotes', 'http://gnomedesktop.org/node/feed');
|
insert into ttrss_feeds (owner_uid,title,feed_url) values (1,'Footnotes', 'http://gnomedesktop.org/node/feed');
|
||||||
insert into ttrss_feeds (owner_uid,title,feed_url) values (1,'Latest Linux Kernel Versions','http://kernel.org/kdist/rss.xml');
|
insert into ttrss_feeds (owner_uid,title,feed_url) values (1,'Latest Linux Kernel Versions','http://kernel.org/kdist/rss.xml');
|
||||||
|
|
|
@ -49,7 +49,8 @@ create table ttrss_feeds (id serial not null primary key,
|
||||||
last_error text not null default '',
|
last_error text not null default '',
|
||||||
site_url varchar(250) not null default '',
|
site_url varchar(250) not null default '',
|
||||||
auth_login varchar(250) not null default '',
|
auth_login varchar(250) not null default '',
|
||||||
auth_pass varchar(250) not null default '');
|
parent_feed integer default null references ttrss_feeds(id) on delete set null,
|
||||||
|
auth_pass varchar(250) not null default '');
|
||||||
|
|
||||||
create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid);
|
create index ttrss_feeds_owner_uid_index on ttrss_feeds(owner_uid);
|
||||||
|
|
||||||
|
|
6
schema/upgrade-1.1.1-1.1.2-mysql.sql
Normal file
6
schema/upgrade-1.1.1-1.1.2-mysql.sql
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
begin;
|
||||||
|
|
||||||
|
alter table ttrss_feeds add column parent_feed integer;
|
||||||
|
alter table ttrss_feeds add foreign key (parent_feed) references ttrss_feeds(id) on delete set null;
|
||||||
|
|
||||||
|
commit;
|
6
schema/upgrade-1.1.1-1.1.2-pgsql.sql
Normal file
6
schema/upgrade-1.1.1-1.1.2-pgsql.sql
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
begin;
|
||||||
|
|
||||||
|
alter table ttrss_feeds add column parent_feed integer;
|
||||||
|
alter table ttrss_feeds add foreign key (parent_feed) references ttrss_feeds(id) on delete set null;
|
||||||
|
|
||||||
|
commit;
|
Loading…
Reference in a new issue