Discussion Forum

How to rename schema label? The conflict output between the code and console

How to rename a entity/attribute/relation label in schema?
I followed the grakn 1.8.4 doc: docs/type.yml at 80ba09226ad666dea44f788898f04eac18c25cab · vaticle/docs · GitHub

Worte the code as below:

def schema_rename_entity(old,new,tx):
    cmd = "match $x sub entity; get $x;".format(old)
    _iter = tx.query(cmd)
    if _iter:
        for concept in _iter:
            c = concept.map().get("x").as_remote(tx)
            _label = c.label()
            if _label is old:

schema_rename_entity("个人", "个体", tx)

The code output:
And the detailed printout shows the change did happen:

However, when I running console, the change didn’t happen:

My question is that, why console shows different behaviour with code?

You haven’t committed the change I think?