Skip to content

feat(db): set up NeonDB + Drizzle ORM with membership schema #1917

@cdcore09

Description

@cdcore09

Summary

Set up the database infrastructure for the membership management system. Design and implement the schema, configure NeonDB serverless Postgres, and establish the Drizzle ORM migration workflow.

Requirements

  • Configure NeonDB project and connection (serverless driver)
  • Set up Drizzle ORM with type-safe schema definitions
  • Design schema tables: users, profiles, memberships, roles, sessions, audit_log
  • Profile fields: name, pronouns, bio, institution, title, photo_url, github, linkedin, orcid, website, research_interests (array), working_groups, affinity_groups
  • Role system: member, admin (board/staff), super_admin
  • Audit log table for admin actions (who did what, when)
  • Set up Drizzle Kit for migration generation and management
  • Seed script for development data
  • Document schema in a migrations README

Context

Parent issue: #1916
This is the foundation — must be completed before auth, profiles, or admin dashboard.

Implementation Notes

  • Use drizzle-orm/neon-http for serverless edge compatibility
  • Schema should use Postgres-native types (jsonb for flexible fields, text arrays for tags)
  • Consider Drizzle relations for type-safe joins
  • All timestamps should be timestamp with time zone

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions