add column for slash:comments and alike in ttrss_entries (+ add upgrade scripts for 1.1.1)

This commit is contained in:
Andrew Dolgov 2005-12-10 08:14:29 +01:00
parent 75836f3386
commit eb40e11b14
4 changed files with 22 additions and 0 deletions

View file

@ -71,6 +71,7 @@ create table ttrss_entries (id integer not null primary key auto_increment,
content_hash varchar(250) not null, content_hash varchar(250) not null,
no_orig_date bool not null default 0, no_orig_date bool not null default 0,
date_entered datetime not null, date_entered datetime not null,
num_comments integer not null default 0,
comments varchar(250) not null default '') TYPE=InnoDB; comments varchar(250) not null default '') TYPE=InnoDB;
create table ttrss_user_entries ( create table ttrss_user_entries (

View file

@ -65,6 +65,7 @@ create table ttrss_entries (id serial not null primary key,
content_hash varchar(250) not null, content_hash varchar(250) not null,
no_orig_date boolean not null default false, no_orig_date boolean not null default false,
date_entered timestamp not null default NOW(), date_entered timestamp not null default NOW(),
num_comments integer not null default 0,
comments varchar(250) not null default ''); comments varchar(250) not null default '');
create index ttrss_entries_guid_index on ttrss_entries(guid); create index ttrss_entries_guid_index on ttrss_entries(guid);

View file

@ -0,0 +1,10 @@
begin;
alter table ttrss_entries add column num_comments integer;
update ttrss_entries set num_comments = 0;
alter table ttrss_entries change num_comments num_comments integer not null;
alter table ttrss_entries alter column num_comments set default 0;
commit;

View file

@ -0,0 +1,10 @@
begin;
alter table ttrss_entries add column num_comments integer;
update ttrss_entries set num_comments = 0;
alter table ttrss_entries alter column num_comments set not null;
alter table ttrss_entries alter column num_comments set default 0;
commit;