COS301-SE-2024 / The-Republic

Imagine a fusion of ‘Eskom se Push’ and ‘X’. The Republic allows users to raise concerns and spread awareness about government services through incident reports, with cool data visualizations providing a dynamic overview of public sentiment on service delivery.
https://the-republic.co.za/about
9 stars 2 forks source link

Database Schema for Organizations #279

Closed hlokomani closed 2 months ago

hlokomani commented 2 months ago

Objective

Design and implement the database schema to support organizations in the application.

Tasks

  1. Create an 'organizations' table with fields:
    • id (primary key)
    • name
    • username (unique)
    • description
    • creation_date
    • logo_url
    • website
    • verified_status
    • join_policy (e.g., 'open', 'request_to_join')
    • points
  2. Create an 'organization_members' table with fields:
    • id (primary key)
    • organization_id (foreign key to organizations)
    • user_id (foreign key to users)
    • role (e.g., 'admin', 'member')
    • join_date
  3. Add necessary indexes for performance optimization, including on the 'username' and 'join_policy' fields
  4. Ensure uniqueness constraint on the 'username' field across both users and organizations tables

Acceptance Criteria