Change PK to UUID

Options
Max
Max Member
edited October 2023 in ❓Other questions

is there any way to change PK to something else? for example to UUID field.

I know its possible to work with uuid without that and im already doing that in mine every API endpoint, but calling that incovinient will be extreme understatement. And also that an absolutely unjustified hit on endpoints performance.

And using numeric ids on frontend is both a security hole and bad data design.

I am making this post in hope that I missed something or misunerstood, and there is a way to change PK in Xano. (not only that possible in postgres, but even in other cloud backends based on it, like for example Supabase)

Answers

  • mike-k
    mike-k Member
    Options

    I'd like to upvote that this would be a valuable addition. I don't think it's possible.

  • Max
    Max Member
    edited October 2023
    Options

    yea… im about to drop Xano and mine 60+% built complex app, just for that reason. its completely impossible to understand, especially given such tight and advertised postgres functionality, but this struggle to make app with zero ID's exposure whatsoever in Xano is just getting under mine skin. Seems completely unjustified.

  • Sean Montgomery
    Sean Montgomery Administrator

    ADMIN

    Options

    Hi @Max,

    Sorry to hear about your frustration with the primary key not being a UUID.

    You have the option to use unique indexes on other fields and can include a UUID, which would let you not expose the sequential id to your frontend.

    I understand that it isn't as easy as changing the primary key type, but that would solve your issue today.

    We have had other users expressed their desire for more flexibility on the primary keys and it is something we are working on improving.

  • Max
    Max Member
    edited October 2023
    Options

    I know its possible, and i did it with 40+ endpoints so far, but thats 20 to 80% of every stack - just to get a basic backend security. And when dealing with entities that have arrays of FK's its getting to ridiculous amounts of functions just to deal with id exposure. Also for sure thats gonna impact final app performance.

    is there any ETA on when we will be able to change PK in Xano? I love platform so much, but that seems to be a huge deal breaker:(