PLUCS2/Oenana

Schema

Opened this issue · 0 comments

Great job on this! Some changes to make:

misc

  • Let's remove the companies table for now. It can be a bonus feature if anything
  • adding timestamps to each table means there will be columns of created_at and updated_at, so let's have those instead of the timestamps column
  • When you view a project in List form, there are many sections, each of which has tasks whose order you can change around and you can drag a task from section to section. You can also drag and drop the order of the sections within the project itself. When you view a project in Column form, the same functionality exists but the sections are now called columns. We need to reflect this at the db level by making another table (either called sections or columns) that will have a name, a next_id, and a prev_id to keep track of the spot it holds within the project. Both next_id and prev_id can be null. A section/column will have many tasks, so a task will belong to the section/column. Please let me know if you have any questions on this!

users

  • Remove company_id foreign key since there will not be a companies table
  • When a user navigates to My Profile Settings, there are additional fields that are missing from your db (role, about_me, pronouns). Let's add those in

teams

  • Remove company_id
  • Add a description column

projects

  • Add owner_id foreign key

tasks

  • Is the user_id column referring to the person who created the task, or the person to whom the task is assigned? Make sure you have a way of tracking the latter (ex.: have two columns of user foreign keys - one for the user who made the task and one for the user who has to complete it)
  • Add foreign key of section_id or column_id depending on which default you go with
  • Add columns of next_id and prev_id to keep track of the spot this task holds within the section/column that it belongs to
  • Add column to keep track of when a task is completed (different from its due date)

Let me know if you have any questions!