When enabling a legalConsent option (e.g., requirePrivacyPolicy: true) which adds a new boolean column (e.g., privacyPolicyAccepted) to the user table, running npx @better-auth/cli migrate fails if the user table already contains existing rows.
error: column "privacyPolicyAccepted" of relation "user" contains null values at /path/to/node_modules/.pnpm/pg@8.x.x/node_modules/pg/lib/client.js:... ... (rest of stack trace) ...
Steps to Reproduce:
- Have an existing Better Auth setup with users in the user table.
- Enable a new legalConsent option in auth.ts (e.g., legalConsent({ requirePrivacyPolicy: true })).
- Run npx @better-auth/cli migrate.