i want to create a row un auth.users
and then create a user in a table profiles
but i want to use the same id for both tables.
So, if insert a row in profiles fails, i want a rollback.
is this possible?
TL;DR
Developer wants to create a transaction involving both the `auth.users` and `profiles` tables, using the same id for both. They need the ability to rollback if the insertion into the `profiles` table fails.
Solution: Yes, it is possible to achieve this using transactions in the database. By wrapping the insertions into both tables within a transaction block, if an error occurs during the insertion into the `profiles` table, the transaction can be rolled back to maintain data consistency.