aboutsummaryrefslogtreecommitdiff
path: root/lib/database.cc
diff options
context:
space:
mode:
authorTodd <todd@electricoding.com>2015-01-22 17:43:37 -0600
committerDavid Bremner <david@tethera.net>2015-01-24 16:47:47 +0100
commit0de999aab5bd4cd44bc4ea76fd1d25172bd839ae (patch)
treef18470d4b22e4fbf3f9fc555683c59d44a4ca459 /lib/database.cc
parent0829bd4e5da82a14e003f4036592913adb00e243 (diff)
Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES database feature
This feature will exist in all newly created databases, but there is no upgrade provided for it. If this flag exists, it indicates that the database was created after the indexed MIME-types feature was added.
Diffstat (limited to 'lib/database.cc')
-rw-r--r--lib/database.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/database.cc b/lib/database.cc
index 3601f9de..0d2c4172 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -304,6 +304,11 @@ static const struct {
"exact folder:/path: search", "rw" },
{ NOTMUCH_FEATURE_GHOSTS,
"mail documents for missing messages", "w"},
+ /* Knowledge of the index mime-types are not required for reading
+ * a database because a reader will just be unable to query
+ * them. */
+ { NOTMUCH_FEATURE_INDEXED_MIMETYPES,
+ "indexed MIME types", "w"},
};
const char *
@@ -646,9 +651,10 @@ notmuch_database_create (const char *path, notmuch_database_t **database)
if (status)
goto DONE;
- /* Upgrade doesn't add this feature to existing databases, but new
- * databases have it. */
+ /* Upgrade doesn't add these feature to existing databases, but
+ * new databases have them. */
notmuch->features |= NOTMUCH_FEATURE_FROM_SUBJECT_ID_VALUES;
+ notmuch->features |= NOTMUCH_FEATURE_INDEXED_MIMETYPES;
status = notmuch_database_upgrade (notmuch, NULL, NULL);
if (status) {