schema: add fulltext indexes for mysql to support af_psql_trgm and possibly future fulltext search

This commit is contained in:
Andrew Dolgov 2022-06-19 21:53:57 +03:00
parent 9428e2c571
commit 6d98cc6c80
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
4 changed files with 10 additions and 1 deletions

View File

@ -6,7 +6,7 @@ class Config {
const T_STRING = 2;
const T_INT = 3;
const SCHEMA_VERSION = 146;
const SCHEMA_VERSION = 147;
/** override default values, defined below in _DEFAULTS[], prefixing with _ENVVAR_PREFIX:
*

View File

@ -0,0 +1,2 @@
create fulltext index if not exists ttrss_entries_title_search_idx on ttrss_entries(title);
create fulltext index if not exists ttrss_entries_combined_search_idx on ttrss_entries(title, content);

View File

@ -169,6 +169,9 @@ create table ttrss_entries (id integer not null primary key auto_increment,
create index ttrss_entries_date_entered_index on ttrss_entries(date_entered);
create index ttrss_entries_updated_idx on ttrss_entries(updated);
create fulltext index if not exists ttrss_entries_title_search_idx on ttrss_entries(title);
create fulltext index if not exists ttrss_entries_combined_search_idx on ttrss_entries(title, content);
create table ttrss_user_entries (
int_id integer not null primary key auto_increment,
ref_id integer not null,

View File

@ -0,0 +1,4 @@
-- no-op, 147 is mysql-specific.
-- the following dummy query is added because migration engine doesn't support empty schema files.
select true;