Change Primary ID in Schema Using GSQL

Hello, is there a method of changing the primary ID of a vertex using GSQL?

E.g., Vertex A has primary ID (+attribute) “name” but now I want it to be “email_address”

I can’t use ALTER to do this. Would I need to DROP and then ADD the vertex?

@emackie Correct - You cannot change the primary ID using ALTER and will need to DROP and ADD as you mentioned.

ALTER …​ ADD can add attributes to vertex or edge types. You cannot make changes to a vertex type’s primary key or an edge types discriminator.

1 Like