Is adding an additional column in a database table to track read/unread status of messages a common practice in PHP development?

To track the read/unread status of messages in a database table in PHP development, it is common practice to add an additional column to the table specifically for this purpose. This column can store a boolean value (0 for unread, 1 for read) and can be updated accordingly when a message is viewed by a user.

// Assuming we have a database connection established

// Add a new column to the messages table to track read/unread status
$query = "ALTER TABLE messages ADD COLUMN read_status TINYINT(1) NOT NULL DEFAULT 0";
mysqli_query($conn, $query);

// Update the read status of a message when it is viewed
$message_id = 1; // Example message ID
$query = "UPDATE messages SET read_status = 1 WHERE id = $message_id";
mysqli_query($conn, $query);