hi, i'm trying to migrate to casdoor for user managerment, the user id is uuid string, but my old system use integer id, for compatibility, is it ok if i change user table's external_id to integer and auto increase or add another column to do the same thing? or if there is any best practice for it?
You need them to be sync or is it one time migration ?
neither, just my application needs an integer user id, so i'm wondering how to generate it properly in casdoor 🙂
Okay yes call the new parameter how you like external id is okay
do int-to-string convertion and store it in user.Id
if you need orders, store it in user.Ranking
my old application use both id/uuid for internal and external usage :(, trying to migrate to casdoor, i check ranking as well, it seems it could be modified on the ui , i'm thinking
- make the jwt include the external_id ( i modify it as int), not sure if there's easy way to do it
- add the integer id into ranking , and add a trigger to disable modification on ranking(then i will be available on jwt token), not sure if there's other way to disable modification
handle yourself, these are just trivial things
modify code as you desire
Join the conversation
Sign up to reply, like and follow topics.
Suggested Topics
Want to read more? Browse other topics in Casdoor or view latest topics.
1 / 7
May 2025
