view_settings varchar(250) not null default '',
pubsub_state integer not null default 0,
favicon_last_checked datetime default null,
- index(owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
- index(cat_id),
foreign key (cat_id) references ttrss_feed_categories(id) ON DELETE SET NULL,
index(parent_feed),
foreign key (parent_feed) references ttrss_feeds(id) ON DELETE SET NULL) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
author varchar(250) not null default '') ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create index ttrss_entries_date_entered_index on ttrss_entries(date_entered);
-create index ttrss_entries_guid_index on ttrss_entries(guid);
create index ttrss_entries_updated_idx on ttrss_entries(updated);
create table ttrss_user_entries (
last_marked datetime,
last_published datetime,
unread bool not null default 1,
- index (ref_id),
foreign key (ref_id) references ttrss_entries(id) ON DELETE CASCADE,
- index (feed_id),
foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE,
index (orig_feed_id),
foreign key (orig_feed_id) references ttrss_archived_feeds(id) ON DELETE SET NULL,
- index (owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create index ttrss_user_entries_owner_uid_index on ttrss_user_entries(owner_uid);
create table ttrss_version (schema_version int not null) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
-insert into ttrss_version values (126);
+insert into ttrss_version values (127);
create table ttrss_enclosures (id integer primary key auto_increment,
content_url text not null,
duration text not null,
width integer not null default 0,
height integer not null default 0,
- index (post_id),
foreign key (post_id) references ttrss_entries(id) ON DELETE cascade) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create index ttrss_enclosures_post_id_idx on ttrss_enclosures(post_id);
index(section_id),
foreign key (section_id) references ttrss_prefs_sections(id)) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
-create index ttrss_prefs_pref_name_idx on ttrss_prefs(pref_name);
-
insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('PURGE_OLD_DAYS', 3, '60', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('DEFAULT_UPDATE_INTERVAL', 3, '30', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('DEFAULT_ARTICLE_LIMIT', 3, '30', 2);
profile integer,
index (profile),
foreign key (profile) references ttrss_settings_profiles(id) ON DELETE CASCADE,
- index (owner_uid),
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
- index (pref_name),
foreign key (pref_name) references ttrss_prefs(pref_name) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create index ttrss_user_prefs_owner_uid_index on ttrss_user_prefs(owner_uid);
create index ttrss_user_prefs_pref_name_idx on ttrss_user_prefs(pref_name);
-create table ttrss_sessions (id varchar(250) unique not null primary key,
+create table ttrss_sessions (id varchar(250) not null primary key,
data text,
expire integer not null,
- index (id),
index (expire)) ENGINE=InnoDB DEFAULT CHARSET=UTF8;
create table ttrss_feedbrowser_cache (
lang varchar(2),
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);
create index ttrss_entries_date_entered_index on ttrss_entries(date_entered);
create index ttrss_entries_updated_idx on ttrss_entries(updated);
create table ttrss_version (schema_version int not null);
-insert into ttrss_version values (126);
+insert into ttrss_version values (127);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
access_level integer not null default 0,
def_value text not null);
-create index ttrss_prefs_pref_name_idx on ttrss_prefs(pref_name);
-
insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('PURGE_OLD_DAYS', 3, '60', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('DEFAULT_UPDATE_INTERVAL', 3, '30', 1);
insert into ttrss_prefs (pref_name,type_id,def_value,section_id) values('DEFAULT_ARTICLE_LIMIT', 3, '30', 2);
create index ttrss_user_prefs_pref_name_idx on ttrss_user_prefs(pref_name);
-- create index ttrss_user_prefs_value_index on ttrss_user_prefs(value);
-create table ttrss_sessions (id varchar(250) unique not null primary key,
+create table ttrss_sessions (id varchar(250) not null primary key,
data text,
expire integer not null);
--- /dev/null
+BEGIN;
+
+ALTER TABLE ttrss_enclosures DROP INDEX post_id;
+ALTER TABLE ttrss_entries DROP INDEX ttrss_entries_guid_index;
+ALTER TABLE ttrss_feeds DROP INDEX owner_uid;
+ALTER TABLE ttrss_feeds DROP INDEX cat_id;
+ALTER TABLE ttrss_prefs DROP INDEX ttrss_prefs_pref_name_idx;
+ALTER TABLE ttrss_sessions DROP INDEX id_2;
+ALTER TABLE ttrss_sessions DROP INDEX id;
+ALTER TABLE ttrss_user_entries DROP INDEX ref_id;
+ALTER TABLE ttrss_user_entries DROP INDEX owner_uid;
+ALTER TABLE ttrss_user_entries DROP INDEX feed_id;
+ALTER TABLE ttrss_user_prefs DROP INDEX pref_name;
+ALTER TABLE ttrss_user_prefs DROP INDEX owner_uid;
+
+UPDATE ttrss_version SET schema_version = 127;
+
+COMMIT;