From: Andrew Dolgov Date: Thu, 9 Aug 2007 10:09:22 +0000 (+0100) Subject: schema: add published column X-Git-Tag: 1.2.14~118 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ffba8297eaada358f913d327816d4b7d91f3375b;p=tt-rss.git schema: add published column --- diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index bbc76907..8666a755 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -101,6 +101,7 @@ create table ttrss_user_entries ( feed_id int not null, owner_uid integer not null, marked bool not null default 0, + published bool not null default 0, last_read datetime, unread bool not null default 1, index (ref_id), diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index 04abd68a..71af0237 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -97,6 +97,7 @@ create table ttrss_user_entries ( feed_id int references ttrss_feeds(id) ON DELETE CASCADE not null, owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE, marked boolean not null default false, + published boolean not null default false, last_read timestamp, unread boolean not null default true); diff --git a/schema/versions/mysql/19.sql b/schema/versions/mysql/19.sql index 19bb4b25..db4237da 100644 --- a/schema/versions/mysql/19.sql +++ b/schema/versions/mysql/19.sql @@ -1,3 +1,8 @@ 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; diff --git a/schema/versions/pgsql/19.sql b/schema/versions/pgsql/19.sql index 19bb4b25..79e62846 100644 --- a/schema/versions/pgsql/19.sql +++ b/schema/versions/pgsql/19.sql @@ -1,3 +1,8 @@ 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;