Mirage
Mirage

Reputation: 31548

How to manage mysql tables relationships with date thing

I have this scenario

User can have many profiles per year and i also want to keep history as well

I have following tables

  1. User
  2. Profile

Now i am confused should i make separate table for year.

I am confused to make separate profile per year.

I mean when the new year comes then i would want to copy the profile to new profile so that they can edit the new profile but previous year profile will remain uneditable

Upvotes: 0

Views: 102

Answers (1)

octern
octern

Reputation: 4868

Just have one table for profiles. Each profile should have a creation date. Then you can sort by date and make the newest profile editable, and treat the older ones as archives.

Upvotes: 2

Related Questions