Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Supabase Setup #2

Open
2 tasks
jaydenpersonnat opened this issue Sep 27, 2023 · 0 comments
Open
2 tasks

Supabase Setup #2

jaydenpersonnat opened this issue Sep 27, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jaydenpersonnat
Copy link
Collaborator

jaydenpersonnat commented Sep 27, 2023

Resources

Description

❗ Note: Take this deliverable if you tend to work earlier than later, since having a schema set up will make things easier for others' deliverables.

At the moment, our Supabase database is using the default schema (just a users table with some basic information). We want to change this to be our currently planned schema (see link under Resources).

This is a two-person deliverable, so work together! It's up to you to find time to work together or split work appropriately to perform asynchronously.

  • Modify setup.sql to contain statments that create tables as outlined in the database schema linked above.
    • Make sure to include foreign keys! In the schema, columns that represent foreign keys have an arrow pointing to the origin of
      the key.
    • Test your work by trying to create your tables in your own Supabase project. (Similarly to how you did in your deliverable and/or
      starter project, instructions in the README.)
    • Unless listed as required (not nullable) below, assume each column is nullable.
    • users required columns:
      • id
      • email
      • password
    • patients required columns:
      • id
      • userId
    • clinicians required columns:
      • id
      • userId
    • admins should have all columns required
    • clinics should have all columns required
    • messages required columns:
      • id
      • sender
      • receiver
      • message
    • tasks required columns:
      • id
      • assigner
      • patient
      • name
      • assignDate
      • completed
      • completeDate
    • clinicMembers should have all columns required
    • milestones:
      • id
      • assigner
      • patient
      • clinicId
      • name
  • Enable Row Level Security and relevant policies
    • Users should be able to view/edit their own data and clinicians should be able to view patient data
    • Users should be able to view clinics they own or are part of.
    • Clinicians should be able to create/edit/delete their clinics.
    • Clinicians should be able to view all members of clinics they own.
    • Users should be able to view/insert their messages (whether they are sender or receiver)
    • Patients should be able to view/edit tasks they have been assigned
    • Clinicians should be able to create/edit/delete/view tasks they have assigned
    • Patients should be able to view milestones they have been assigned
    • Clinicians should be able to create/edit/delete/view milestones they have assigned
@jaydenpersonnat jaydenpersonnat added the enhancement New feature or request label Sep 27, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants