Rank 1: Thread
i want to relate the $id from users auth table in appwrite with other column in my table user_profile.
because is the same user...
how can i have exactly the same id for both tables?
Votes
0
Replies
2
Participants
2
Messages
3
Rank 1: Thread
i want to relate the $id from users auth table in appwrite with other column in my table user_profile.
because is the same user...
how can i have exactly the same id for both tables?
We cant do this actually
One of the easiest ways would be via auth events
Whenever a new user is created, shoot a function that copies the data into the table
Or one more way , since we support transactions now and we know transactions are atomic
So I would follow this but can be counter intuitive as well but db and auth would be totally in sync
A bit counter intuitive as auth should be the source of truth and not database but we are doing db operation first. But it will work reliably
Rank 2: Process
nice!!!, well at least there's a way to achieve that.
because the problem with auth.users is that assume a solid shape for users.
and in the other hand, if you create your own user table, you lose built-in features of auth.users table :p