Skip to content

Refactor user identification: Normalize user mapping and update messages table #56

@mahata

Description

@mahata

Currently, the messages table contains both user_email and user_name columns, which is redundant since each user_name is uniquely associated with a user_email. To normalize this design and reduce redundancy:

  1. Create a new table (e.g., users) that stores the mapping between user_email and user_name. Each user should have a unique user_id.
  2. Refactor the messages table to replace both user_email and user_name columns with a single user_id column that references the new users table.
  3. Update the login logic so that when a user logs in, if their user_email doesn't exist in the new users table, a new record is created. This ensures mlack can distinguish new users from existing ones.

This change will improve data integrity and make user management more efficient.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions