add author column to ttrss_entries, add upgrade script for 1.1.4, bump schema version

This commit is contained in:
Andrew Dolgov 2006-02-26 07:39:09 +01:00
parent 63147705ab
commit 4bc760da51
6 changed files with 25 additions and 2 deletions

View file

@ -83,7 +83,8 @@ create table ttrss_entries (id integer not null primary key auto_increment,
no_orig_date bool not null default 0,
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 '',
author varchar(250) not null default '') TYPE=InnoDB;
create table ttrss_user_entries (
int_id integer not null primary key auto_increment,

View file

@ -75,7 +75,8 @@ create table ttrss_entries (id serial not null primary key,
no_orig_date boolean not null default false,
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 '',
author varchar(250) not null default '');
create index ttrss_entries_guid_index on ttrss_entries(guid);
create index ttrss_entries_title_index on ttrss_entries(title);

View file

@ -0,0 +1,9 @@
alter table ttrss_entries add column author varchar(250);
update ttrss_entries set author = ;;;
alter table ttrss_entries change author author varchar(250) not null;
alter table ttrss_entries alter column author set default '';
update ttrss_version set schema_version = 6;

View file

@ -0,0 +1,12 @@
begin;
alter table ttrss_entries add column author varchar(250);
update ttrss_entries set author = '';
alter table ttrss_entries alter column author set not null;
alter table ttrss_entries alter column author set default '';
update ttrss_version set schema_version = 6;
commit;