Skip to content

fix(auth): exclude retired organization columns from adapter queries - #7813

Merged
icecrasher321 merged 2 commits into
stagingfrom
codex/better-auth-retired-columns
Sep 14, 2026
Merged

icecrasher321 merged 2 commits into
stagingfrom
codex/better-auth-retired-columns

Conversation

@icecrasher321

@icecrasher321 icecrasher321 commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Keep Better Auth organization reads, inserts, and returned rows on the live-column projection, including transaction callbacks.
  • Preserve the database schema; deploy this prep before dropping organization.departed_member_usage.
  • Cover the real adapter with SQL regressions and PostgreSQL CRUD tests before and after the column drop, and run the PostgreSQL tests in both CI provisioning paths.
  • Remove the flaky integration-mention context test that intermittently exceeds the test timeout.

Type of Change

  • Bug fix

Testing

  • 84 focused adapter, SQL, OAuth, billing-guard, and remaining context tests passed.
  • 2 PostgreSQL tests passed for normal and transactional CRUD before and after the drop.
  • App type-check, full lint, and all repository audits passed.
  • Migration safety check passed; Drizzle generation reports no schema changes.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 14, 2026 6:56pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The auth-adapter change appears safe to merge, with only a non-blocking loss of unrelated Copilot regression coverage.

Findings

  1. P2 Integration Coverage Removed

Summary

  • Applies the projection to ordinary and transactional adapter operations.
  • Adds SQL-level and PostgreSQL CRUD coverage before and after the planned column drop.
  • Adds the PostgreSQL adapter suite to CI and documents the deployment ordering.
  • Also removes an unrelated Copilot integration-resolution regression test.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Better Auth organization operation] --> B[createSimAuthAdapter]
  B --> C[AUTH_SCHEMA organization projection]
  C --> D[Live organization columns only]
  D --> E[(PostgreSQL organization table)]
  E --> F[Retired column can be dropped after deployment]
Loading

Reviews (2) · Last reviewed commit: "chore(tests): remove flaky integration c..."

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@icecrasher321 I have started the AI code review. It will take a few minutes to complete.

@icecrasher321

Copy link
Copy Markdown
Collaborator Author

The integration-context case was removed intentionally under the request to remove nondeterministic tests. It passed in isolation but exceeded the 10-second timeout in CI. The loss of this specific regression case is acknowledged; the remaining context tests and the new SQL/PostgreSQL adapter coverage are retained and passing.

@icecrasher321
icecrasher321 merged commit 88a32d4 into staging Sep 14, 2026
33 of 34 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/better-auth-retired-columns branch September 14, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant