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 (
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);
--- /dev/null
+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;
--- /dev/null
+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;