keygen-sh/keygen-api

Update nullable foreign keys to be non-nullable

Opened this issue · 0 comments

For correctness, and also for query performance via query planner optimizations.

  • billings.account_id
  • keys.account_id
  • keys.policy_id
  • licenses.account_id (#819)
  • licenses.policy_id (#820)
  • licenses.product_id (#817)
  • machines.account_id (#822)
  • machines.license_id (#823)
  • metrics.account_id
  • policies.account_id (#826)
  • policies.product_id (#828)
  • products.account_id (#825)
  • request_logs.account_id
  • roles.resource_id
  • roles.resource_type
  • tokens.account_id
  • tokens.bearer_id
  • tokens.bearer_type
  • users.account_id (#821)
  • webhook_endpoints.account_id
  • webhook_events.account_id

Ref: https://gist.github.com/ezekg/3bbc5e91d9f1211115c956a7f09d924b