Schema governance audit

Generated by go run ./cmd/dbdocs; findings are review inputs, not automatic destructive actions.

Columns without comments (27)

  • auth.identity_tokens.id
  • auth.identity_tokens.user_id
  • auth.identity_tokens.kind
  • auth.identity_tokens.token_digest
  • auth.identity_tokens.payload
  • auth.identity_tokens.expires_at
  • auth.identity_tokens.consumed_at
  • auth.identity_tokens.created_at
  • auth.login_events.id
  • auth.login_events.user_id
  • auth.login_events.success
  • auth.login_events.risk_score
  • auth.login_events.anomalous
  • auth.login_events.ip
  • auth.login_events.user_agent
  • auth.login_events.reason
  • auth.login_events.created_at
  • users.product_records.id
  • users.product_records.kind
  • users.product_records.owner_id
  • users.product_records.subject_id
  • users.product_records.name
  • users.product_records.status
  • users.product_records.payload
  • users.product_records.expires_at
  • users.product_records.created_at
  • users.product_records.updated_at

Required columns without defaults (31)

  • audit.audit_logs.action
  • audit.audit_logs.entity
  • audit.event_outbox.id
  • audit.event_outbox.stream
  • audit.event_outbox.event
  • audit.event_outbox.payload
  • audit.processed_messages.message_id
  • auth.change_log.table_name
  • auth.change_log.operation
  • auth.identity_tokens.kind
  • auth.identity_tokens.token_digest
  • auth.identity_tokens.expires_at
  • auth.login_events.success
  • auth.sessions.user_id
  • auth.sessions.refresh_token_hash
  • auth.sessions.family_id
  • auth.sessions.expires_at
  • rbac.change_log.table_name
  • rbac.change_log.operation
  • rbac.permissions.name
  • rbac.role_permissions.role_id
  • rbac.role_permissions.permission_id
  • rbac.roles.name
  • rbac.user_roles.user_id
  • rbac.user_roles.role_id
  • rbac.user_versions.user_id
  • users.change_log.table_name
  • users.change_log.operation
  • users.product_records.kind
  • users.users.email
  • users.users.password_hash

Time columns not using TIMESTAMPTZ (0)

None.

ck_/fk_/uq_ naming exceptions (8)

  • auth.identity_tokens.identity_tokens_kind_check
  • auth.identity_tokens.identity_tokens_payload_size
  • auth.identity_tokens.identity_tokens_token_digest_key
  • auth.login_events.login_events_risk_score_check
  • users.product_records.product_records_kind_check
  • users.product_records.product_records_name_length
  • users.product_records.product_records_payload_size
  • users.product_records.product_records_status_length