schema: add published column
This commit is contained in:
parent
bc0ed820d1
commit
ffba8297ea
4 changed files with 12 additions and 0 deletions
|
@ -101,6 +101,7 @@ create table ttrss_user_entries (
|
||||||
feed_id int not null,
|
feed_id int not null,
|
||||||
owner_uid integer not null,
|
owner_uid integer not null,
|
||||||
marked bool not null default 0,
|
marked bool not null default 0,
|
||||||
|
published bool not null default 0,
|
||||||
last_read datetime,
|
last_read datetime,
|
||||||
unread bool not null default 1,
|
unread bool not null default 1,
|
||||||
index (ref_id),
|
index (ref_id),
|
||||||
|
|
|
@ -97,6 +97,7 @@ create table ttrss_user_entries (
|
||||||
feed_id int references ttrss_feeds(id) ON DELETE CASCADE not null,
|
feed_id int references ttrss_feeds(id) ON DELETE CASCADE not null,
|
||||||
owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
|
owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
|
||||||
marked boolean not null default false,
|
marked boolean not null default false,
|
||||||
|
published boolean not null default false,
|
||||||
last_read timestamp,
|
last_read timestamp,
|
||||||
unread boolean not null default true);
|
unread boolean not null default true);
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_PUBLISH_KEY', 2, '', '', 1);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_PUBLISH_KEY', 2, '', '', 1);
|
||||||
|
|
||||||
|
alter table ttrss_user_entries add column published bool;
|
||||||
|
update ttrss_user_entries set published = false;
|
||||||
|
alter table ttrss_user_entries change published published bool not null;
|
||||||
|
alter table ttrss_user_entries alter column published set default false;
|
||||||
|
|
||||||
update ttrss_version set schema_version = 19;
|
update ttrss_version set schema_version = 19;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_PUBLISH_KEY', 2, '', '', 1);
|
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('_PREFS_PUBLISH_KEY', 2, '', '', 1);
|
||||||
|
|
||||||
|
alter table ttrss_user_entries add column published boolean;
|
||||||
|
update ttrss_user_entries set published = false;
|
||||||
|
alter table ttrss_user_entries alter column published set not null;
|
||||||
|
alter table ttrss_user_entries alter column published set default false;
|
||||||
|
|
||||||
update ttrss_version set schema_version = 19;
|
update ttrss_version set schema_version = 19;
|
||||||
|
|
Loading…
Reference in a new issue