Is there a way to modify the schema an existing id...
# talk-kratos
p
Is there a way to modify the schema an existing identity uses? I'm updating my kratos instance and have tweaked the schema. I'd now like to write a script that updates all existing identities to fit the new schema. I tried
kratos import identity ...
but that does not update only inserts so I get a "this id already exists" error.
https://www.ory.sh/docs/kratos/manage-identities/best-practices
When you’re ready to migrate all identities that use the user_v0 to the user_v1 schema, use the REST API to list all identities using the old version and perform the required data transformations.
p
thanks. I'll give this a try.
Can someone at Ory (@high-optician-2097 maybe?) confirm that self-hosted Kratos does not currently support multiple identity schemas? The documents say that but I don't think the code does at the moment though?
If I could use multiple id schemas I could keep existing users in the old schema and have new users use the new one. Ideally though I'd update the old IDs to match the new schema. Hopefully the id patch endpoint api let's me do this. I guess I need to update the schema then update all the user ids?
h
It does support multiple schemas
p
Maybe what I was thinking of is that there is not a way to choose which schema to present to a user. Or something. Thanks.
h
that’s true, that’s an open feature request