Sign up logic questions

Hey guys, i'm in the process of setting up the sign up logic and have a couple questions:
{
"code": "FAILED_TO_CREATE_USER",
"message": "Failed to create user",
"details": {
"code": "ER_BAD_FIELD_ERROR",
"errno": 1054,
"sqlState": "42S22",
"sqlMessage": "Unknown column 'role' in 'field list'",
"sql": "insert into `users` (`id`, `display_name`, `email`, `email_verified`, `image`, `created_at`, `updated_at`, `username`, `display_username`, `role`) values ('Kca7mCuFDfVzyuQvlAqtNRGvV3kXFGiH', 'Test 2', '[email protected]', false, 'https://example.com/image.png', '2025-03-06 14:37:54.100', '2025-03-06 14:37:54.100', 'test2', 'test2', 'user')"
}
}
{
"code": "FAILED_TO_CREATE_USER",
"message": "Failed to create user",
"details": {
"code": "ER_BAD_FIELD_ERROR",
"errno": 1054,
"sqlState": "42S22",
"sqlMessage": "Unknown column 'role' in 'field list'",
"sql": "insert into `users` (`id`, `display_name`, `email`, `email_verified`, `image`, `created_at`, `updated_at`, `username`, `display_username`, `role`) values ('Kca7mCuFDfVzyuQvlAqtNRGvV3kXFGiH', 'Test 2', '[email protected]', false, 'https://example.com/image.png', '2025-03-06 14:37:54.100', '2025-03-06 14:37:54.100', 'test2', 'test2', 'user')"
}
}
1. Is it possible to have the same ID as users created through my api? 2. I don't understand why role is being sent as a field, from what I've read of the docs, the User model has the role field
1 Reply
Geospace
GeospaceOP2mo ago
For 1. i suppose I could just use my regular api createUser endpoint, presumably that's ok to do? Or will that mess with the session?

Did you find this page helpful?