Skip to content

Backend — Database Schema for Entities and System Roles #16

Description

@specfor

We need to design and implement the database schema to support Entities (e.g., Police, Water Board, Electricity Board) and System Users (System Admins vs Entity Admins).

  • Create an entities table (id, name, description, created_at, updated_at).
  • Update the users table (or create a roles relation) to support system_admin, entity_admin, and entity_user roles.
  • Add a foreign key from users to entities (nullable for system admins).
  • Create corresponding up and down SQL migration files.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions