Hi,
What is the best practice/recommended setup for user details and user login details in the Database when using Wappler? Is it better to have two tables? For example:
You would setup a primary key in the users table and then use that same “key” as a foreign key in the users_detail table. You never want to have the same data in 2 tables
so in the end you would have
primary key = users.user_id
foreign key = users_details.user_id
with a 1:1 relationship
I’d recommend you have separate tables. It is a cleaner organization of your information especially when you grow the number of tables as you build and scale up.
I do indeed use email as the username. Emails are personal therefore unique and people remember them better than made up usernames.