Skip to content

Contracts docs: Database schema reference #441

Description

@codebestia

Write apps/backend/docs/contracts-database-schema.md documenting every table in db/schema.ts — users, wallets, conversations, conversationMembers, files, messages, messageEnvelopes, devices, devicePrekeys, tokenTransfers, treasuryProposals, proposalVotes, pushSubscriptions — with every column, type, default, index, and foreign-key relation.

Acceptance criteria:

  • Every table has every column documented (name, type, nullability, default, constraint)
  • Every index (including partial/unique) and every check constraint is documented with what it enforces and why
  • Relations between tables (FKs, cascade behavior) are documented, ideally with a mermaid ER diagram
  • Generated directly from the current schema file, then spot-checked against a real pnpm db:generate output

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackenddocumentationImprovements or additions to documentation

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions