{
  "id": "django-model-constraints-table",
  "kind": "table",
  "slug": "django-model-constraints",
  "iil_id": null,
  "note_url": "https://iinventedlight.com/library/notes/django-model-constraints/",
  "title": "Declare Django CheckConstraint and UniqueConstraint on Meta.constraints",
  "columns": [
    "name",
    "source",
    "detail"
  ],
  "rows": [
    {
      "name": "UNIQUE",
      "source": "Django docs",
      "detail": "Unique values in the columns"
    },
    {
      "name": "NOT NULL",
      "source": "Django docs",
      "detail": "A NOT NULL constraint"
    },
    {
      "name": "CHECK",
      "source": "Django docs",
      "detail": "CHECK constraints"
    },
    {
      "name": "FOREIGN KEY",
      "source": "Django docs",
      "detail": "FOREIGN KEY constraints"
    },
    {
      "name": "PRIMARY KEY",
      "source": "Django docs",
      "detail": "An optional PRIMARY KEY for the table"
    }
  ],
  "related_slugs": [
    "django-models",
    "django-migrations",
    "postgres-constraints-foreign-keys"
  ],
  "license": "CC-BY-4.0",
  "source_license": "BSD-3-Clause (Django docs); Public-Domain (SQLite); prose restates cited source lines in own words",
  "as_of": "2026-11-19",
  "status": "deep-draft-20261119",
  "note": "Restated from the note's GREEN sources; check those sources before relying on a value."
}