From: Andrew Dolgov Date: Sat, 10 Dec 2005 07:14:29 +0000 (+0100) Subject: add column for slash:comments and alike in ttrss_entries (+ add upgrade scripts for... X-Git-Tag: schema_freeze_for_1.1.1~82 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=eb40e11b14b025f3603581977e2f6bbb032967e4;p=tt-rss.git add column for slash:comments and alike in ttrss_entries (+ add upgrade scripts for 1.1.1) --- diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index 6352c2fc..b9855fbd 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -71,6 +71,7 @@ create table ttrss_entries (id integer not null primary key auto_increment, content_hash varchar(250) not null, 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; create table ttrss_user_entries ( diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index dc4fd5eb..d5849291 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -65,6 +65,7 @@ create table ttrss_entries (id serial not null primary key, content_hash varchar(250) not null, 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 ''); create index ttrss_entries_guid_index on ttrss_entries(guid); diff --git a/schema/upgrade-1.1-1.1.1-mysql.sql b/schema/upgrade-1.1-1.1.1-mysql.sql new file mode 100644 index 00000000..685582b8 --- /dev/null +++ b/schema/upgrade-1.1-1.1.1-mysql.sql @@ -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; diff --git a/schema/upgrade-1.1-1.1.1-pgsql.sql b/schema/upgrade-1.1-1.1.1-pgsql.sql new file mode 100644 index 00000000..9c7b5e35 --- /dev/null +++ b/schema/upgrade-1.1-1.1.1-pgsql.sql @@ -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;