add ttrss_user_entries.score; bump schema

This commit is contained in:
Andrew Dolgov 2008-04-30 07:34:08 +01:00
parent 43fc671f79
commit afb6038e47
5 changed files with 17 additions and 3 deletions

View file

@ -2,7 +2,7 @@
require_once "functions.php";
define('EXPECTED_CONFIG_VERSION', 15);
define('SCHEMA_VERSION', 35);
define('SCHEMA_VERSION', 36);
if (!file_exists("config.php")) {
print __("<b>Fatal Error</b>: You forgot to copy

View file

@ -115,6 +115,7 @@ create table ttrss_user_entries (
marked bool not null default 0,
published bool not null default 0,
last_read datetime,
score int not null default 0,
unread bool not null default 1,
index (ref_id),
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;
insert into ttrss_version values (35);
insert into ttrss_version values (36);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,

View file

@ -107,6 +107,7 @@ create table ttrss_user_entries (
marked boolean not null default false,
published boolean not null default false,
last_read timestamp,
score int not null default 0,
unread boolean not null default true);
-- 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);
insert into ttrss_version values (35);
insert into ttrss_version values (36);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,

View 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;

View 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;