Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Latest commit

 

History

History
11 lines (10 loc) · 617 Bytes

database.md

File metadata and controls

11 lines (10 loc) · 617 Bytes

Database

  • use all features from PostgreSQL or PostGIS and all their guidelines
  • use snake_case for everything except database keywords, which should be UPPERCASE
  • prefer enums over numbers, numbers over text
  • enums names should be singular
  • table names should be plural
  • prefer IDs over TEXT for plants
  • prefer TEXT over VARCHAR(n), don't use other variants
  • prefer UUID as primary keys, except for tables that are not subject to concurrent use (backend creates new items)
  • prefer BIGSEQUENCE over SEQUENCE except for users/maps where 2 billion is obviously enough