Username not changing in post table

In my social media app every user have their own username and also everyon can post. after posting anything, when we change our username, the username in the post not changing…
Please Help quickly

When a new post is created, you are probably writing the username as the owner/author of the newly-created post.

If you wrote the user ID instead of the username (the row ID in the Users table), then you could change data related to a user (name, username, picture, etc.) and this new information would update throughout your app.

3 Likes

here what to change?

Use the user ID instead of the username to identify users throughout your tables.

What other users needed to see the users username in top of the profile

You instead record the user’s email or row ID and then use a relation column to find the user and use query columns to get the name, profile picture, etc, I will help you with that when I become team member in your app.