[PR #1419] [MERGED] fix(cli): add on delete cascade constraint to Drizzle references #3799

Closed
opened 2026-03-13 11:13:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1419
Author: @gregtjack
Created: 2/11/2025
Status: Merged
Merged: 2/12/2025
Merged by: @Bekacru

Base: mainHead: feature/drizzle-fk-ondelete-cascade


📝 Commits (1)

  • 054e8f8 add on delete cascade constraint to drizzle references

📊 Changes

2 files changed (+4 additions, -4 deletions)

View changed files

📝 packages/cli/src/generators/drizzle.ts (+1 -1)
📝 packages/cli/test/__snapshots__/auth-schema.txt (+3 -3)

📄 Description

Adds { onDelete: "cascade" } to all foreign key references in the Drizzle schema generator, matching the behavior of the Prisma schema generator


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/1419 **Author:** [@gregtjack](https://github.com/gregtjack) **Created:** 2/11/2025 **Status:** ✅ Merged **Merged:** 2/12/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `feature/drizzle-fk-ondelete-cascade` --- ### 📝 Commits (1) - [`054e8f8`](https://github.com/better-auth/better-auth/commit/054e8f8d899c26246682493cfb20d071c6789840) add on delete cascade constraint to drizzle references ### 📊 Changes **2 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/cli/src/generators/drizzle.ts` (+1 -1) 📝 `packages/cli/test/__snapshots__/auth-schema.txt` (+3 -3) </details> ### 📄 Description Adds `{ onDelete: "cascade" }` to all foreign key references in the Drizzle schema generator, matching the behavior of the Prisma schema generator --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 11:13:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#3799