We are launching a website (paid subscription) and the sign up process includes entering an activation code. Activation codes are printed on scratch cards and sold via offline channels. Some of these cards are for 1 month access. Others are for 3 months and 1 year. Activation codes are unique 10-digit random numbers.

When the access expires, users can buy another activation card and extend the subscription by entering the new activation code. Additionally, we should also be able to extend their subscription if they request for it. For example, until a certain date (e.g. 1 additional week).

Considering the above information, how would you design the DB for the user-activation\_code relationship? Do you think this design is good?

```
tbl_user
----------------
id
name
status_id

tbl_user_status
----------------
id
description

tbl_activation_code
----------------
activation_code
activation_code_type_id
activation_code_status_id
user_id
activated_date
expiry_date

tbl_activation_code_type
----------------
id
description

tbl_activation_code_status
----------------
id
description

```

**Update**: Activation codes will be required only:

1) Upon initial sign up

2) Closer to the access expiry date (say, 7 days) when the system displays a notification with a link to page to enter the activation code

3) After expiry, when a user tries to login, she will be asked for the activation code

Therefore, a user is not expected to key in the activation code as and when wanted.