diff options
-rw-r--r-- | source4/dsdb/schema/schema_set.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c index 1c1e45ef78..c5ac6127d1 100644 --- a/source4/dsdb/schema/schema_set.c +++ b/source4/dsdb/schema/schema_set.c @@ -30,6 +30,11 @@ #include "librpc/gen_ndr/ndr_misc.h" #include "lib/util/tsort.h" +/* change this when we change something in our schema code that + * requires a re-index of the database + */ +#define SAMDB_INDEXING_VERSION "2" + /* override the name to attribute handler function */ @@ -95,6 +100,12 @@ static int dsdb_schema_set_attributes(struct ldb_context *ldb, struct dsdb_schem goto op_error; } + + ret = ldb_msg_add_string(msg_idx, "@IDXVERSION", SAMDB_INDEXING_VERSION); + if (ret != LDB_SUCCESS) { + goto op_error; + } + for (attr = schema->attributes; attr; attr = attr->next) { const char *syntax = attr->syntax->ldb_syntax; |