The conversation there indicates the issue was fixed in v0.8.0, but trying it out in v0.8.1 I still cannot see how to delete a predicate from the schema that negates the above statement. All predicates created seem to linger around forever in the schema.
Is there a solution for that in v0.8.1 as indicated, and if so what is it?
Deleting a predicate doesn’t automatically delete the schema entry associated with the predicate. What it does is it allows you to change the schema (from scalar <=> uid and vice versa).
Though now that I think about it we could delete the schema entry too and then it would be automatically derived from the next mutation for the predicate. I will make this part of the v0.8.2 release which goes out soon.
Indeed the question (both mine and the original one) was specifically about how to delete predicates from the schema specifically.
I would suggest only deleting the entry from the schema if it has a default type. In other words, if we add any data we get an entry with a default type in the schema automatically, so sounds reasonable that if we remove it all again the schema entry is also gone.
That said, if we do have more specific schema definitions it would be surprising to see these definitions gone if the data is removed, since those were put in place independently via explicit actions.
More tersely, it would drop the predicate from the schema if:
all data for a predicate is deleted and its schema has default type
a schema mutation changes a predicate to default type, and there is no data using it
The first point sounds good. It can also be deleted when the type is uid (and there are no reverse/count index on it), something that Dgraph assigns.
I suppose that is a workaround for deleting a predicate which has no data. I would prefer it to be more explicit. Maybe we could have a @delete directive for it which would only work if you have no data for the predicate.