summaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-12-10 08:14:29 +0100
committerAndrew Dolgov <[email protected]>2005-12-10 08:14:29 +0100
commiteb40e11b14b025f3603581977e2f6bbb032967e4 (patch)
tree87cb6fac00cb28f1b0f70049f57d379cea5cd79b /schema
parent75836f33860f26ca55ec8e8661cff4b0edc2fe5e (diff)
add column for slash:comments and alike in ttrss_entries (+ add upgrade scripts for 1.1.1)
Diffstat (limited to 'schema')
-rw-r--r--schema/ttrss_schema_mysql.sql1
-rw-r--r--schema/ttrss_schema_pgsql.sql1
-rw-r--r--schema/upgrade-1.1-1.1.1-mysql.sql10
-rw-r--r--schema/upgrade-1.1-1.1.1-pgsql.sql10
4 files changed, 22 insertions, 0 deletions
diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql
index 6352c2fcc..b9855fbd6 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 dc4fd5eb8..d58492919 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 000000000..685582b89
--- /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 000000000..9c7b5e35d
--- /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;