The database audit found 16 missing foreign-key constraints that need to be reconciled between the code and the database.
accounts and users is in your code but not enforced by the database — rows can refer to missing parents.ai_conversations and permission_profiles is in your code but not enforced by the database — rows can refer to missing parents.ai_messages and ai_conversations is in your code but not enforced by the database — rows can refer to missing parents.ai_user_prompts and ai_prompts is in your code but not enforced by the database — rows can refer to missing parents.api_keys and projects is in your code but not enforced by the database — rows can refer to missing parents.api_keys and users is in your code but not enforced by the database — rows can refer to missing parents.batch_jobs and organizations is in your code but not enforced by the database — rows can refer to missing parents.consent_records and users is in your code but not enforced by the database — rows can refer to missing parents.notifications and organizations is in your code but not enforced by the database — rows can refer to missing parents.org_invites and organizations is in your code but not enforced by the database — rows can refer to missing parents.org_members and organizations is in your code but not enforced by the database — rows can refer to missing parents.org_members and users is in your code but not enforced by the database — rows can refer to missing parents.pending_payments and organizations is in your code but not enforced by the database — rows can refer to missing parents.sessions and users is in your code but not enforced by the database — rows can refer to missing parents.webhook_deliveries and webhook_endpoints is in your code but not enforced by the database — rows can refer to missing parents.webhook_deliveries and projects is in your code but not enforced by the database — rows can refer to missing parents.