add ttrss_user_entries.score; bump schema
This commit is contained in:
parent
43fc671f79
commit
afb6038e47
5 changed files with 17 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
|
|
||||||
define('EXPECTED_CONFIG_VERSION', 15);
|
define('EXPECTED_CONFIG_VERSION', 15);
|
||||||
define('SCHEMA_VERSION', 35);
|
define('SCHEMA_VERSION', 36);
|
||||||
|
|
||||||
if (!file_exists("config.php")) {
|
if (!file_exists("config.php")) {
|
||||||
print __("<b>Fatal Error</b>: You forgot to copy
|
print __("<b>Fatal Error</b>: You forgot to copy
|
||||||
|
|
|
@ -115,6 +115,7 @@ create table ttrss_user_entries (
|
||||||
marked bool not null default 0,
|
marked bool not null default 0,
|
||||||
published bool not null default 0,
|
published bool not null default 0,
|
||||||
last_read datetime,
|
last_read datetime,
|
||||||
|
score int not null default 0,
|
||||||
unread bool not null default 1,
|
unread bool not null default 1,
|
||||||
index (ref_id),
|
index (ref_id),
|
||||||
foreign key (ref_id) references ttrss_entries(id) ON DELETE CASCADE,
|
foreign key (ref_id) references ttrss_entries(id) ON DELETE CASCADE,
|
||||||
|
@ -205,7 +206,7 @@ create table ttrss_tags (id integer primary key auto_increment,
|
||||||
|
|
||||||
create table ttrss_version (schema_version int not null) TYPE=InnoDB;
|
create table ttrss_version (schema_version int not null) TYPE=InnoDB;
|
||||||
|
|
||||||
insert into ttrss_version values (35);
|
insert into ttrss_version values (36);
|
||||||
|
|
||||||
create table ttrss_enclosures (id serial not null primary key,
|
create table ttrss_enclosures (id serial not null primary key,
|
||||||
content_url text not null,
|
content_url text not null,
|
||||||
|
|
|
@ -107,6 +107,7 @@ create table ttrss_user_entries (
|
||||||
marked boolean not null default false,
|
marked boolean not null default false,
|
||||||
published boolean not null default false,
|
published boolean not null default false,
|
||||||
last_read timestamp,
|
last_read timestamp,
|
||||||
|
score int not null default 0,
|
||||||
unread boolean not null default true);
|
unread boolean not null default true);
|
||||||
|
|
||||||
-- create index ttrss_user_entries_feed_id_index on ttrss_user_entries(feed_id);
|
-- create index ttrss_user_entries_feed_id_index on ttrss_user_entries(feed_id);
|
||||||
|
@ -185,7 +186,7 @@ create index ttrss_tags_owner_uid_index on ttrss_tags(owner_uid);
|
||||||
|
|
||||||
create table ttrss_version (schema_version int not null);
|
create table ttrss_version (schema_version int not null);
|
||||||
|
|
||||||
insert into ttrss_version values (35);
|
insert into ttrss_version values (36);
|
||||||
|
|
||||||
create table ttrss_enclosures (id serial not null primary key,
|
create table ttrss_enclosures (id serial not null primary key,
|
||||||
content_url text not null,
|
content_url text not null,
|
||||||
|
|
6
schema/versions/mysql/36.sql
Normal file
6
schema/versions/mysql/36.sql
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
alter table ttrss_user_entries add column score integer;
|
||||||
|
update ttrss_user_entries set score = 0;
|
||||||
|
alter table ttrss_user_entries change score score integer not null;
|
||||||
|
alter table ttrss_user_entries alter column score set default 0;
|
||||||
|
|
||||||
|
update ttrss_version set schema_version = 36;
|
6
schema/versions/pgsql/36.sql
Normal file
6
schema/versions/pgsql/36.sql
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
alter table ttrss_user_entries add column score int;
|
||||||
|
update ttrss_user_entries set score = 0;
|
||||||
|
alter table ttrss_user_entries alter column score set not null;
|
||||||
|
alter table ttrss_user_entries alter column score set default 0;
|
||||||
|
|
||||||
|
update ttrss_version set schema_version = 36;
|
Loading…
Reference in a new issue