[Solved] Database design. User Subscription, active / inactive? [closed]


Include a flag column in the user table to indicate the user’s status, then build views on top of this against which you run your actual queries. Maybe something like this:

create table users (
  ....
  is_active boolean not null
);

create view active_users as
select * from users where is_active = true;

create view inactive_users as
select * from users where is_active = false;

If you need more status values, then have a separate table of status possibilities with a foreign-key relationship between it and the users table.

5

solved Database design. User Subscription, active / inactive? [closed]