FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

✨ Add support for cascade delete relationships: `cascade_delete`, `ondelete`, and `passive_deletes` by estebanx64 · Pull Request #983 · fastapi/sqlmodel · GitHub

Repository navigation

✨ Add support for cascade delete relationships: cascade_delete, ondelete, and passive_deletes - #983

Merged
tiangolo merged 34 commits into
mainfrom
FL-391-support-ondelete-cascade
Jul 21, 2024
Merged

tiangolo merged 34 commits into
mainfrom
FL-391-support-ondelete-cascade

Conversation

Copy link
Copy Markdown
Contributor

No description provided.

tiangolo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice! This is looking great! 🚀

Comment thread sqlmodel/main.py
Comment thread sqlmodel/main.py
Comment thread sqlmodel/main.py
Comment thread sqlmodel/main.py Outdated
Comment thread sqlmodel/sql/_relationship_types.py Outdated

JakNowy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks nice and clean. Very useful feature!

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 65be67c at: https://09764bb3.sqlmodel.pages.dev

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 274b7a7 at: https://da08e328.sqlmodel.pages.dev

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit d9579f6 at: https://2593c0e0.sqlmodel.pages.dev

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 6b40aec at: https://4cd9105f.sqlmodel.pages.dev

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 6529045 at: https://a46900e5.sqlmodel.pages.dev

alejsdev added the feature New feature or request label Jul 5, 2024
tiangolo changed the title ✨ Add ondelete and cascade options for relationships ✨ Add support for cascade delete relationships: cascade_delete, ondelete, and passive_deletes Jul 21, 2024

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 6616272 at: https://bd669c99.sqlmodel.pages.dev

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 51c5d00 at: https://9a77e0cc.sqlmodel.pages.dev

Copy link
Copy Markdown
Member

Great, thank you @estebanx64! 🚀

I updated the docs and tweaked the implementation to support nullables set with int | None, etc. to avoid needing nullable=True. Also because in most cases nullable=True should not be used, and instead declare the type accepting None.

I also updated/extended the source examples and tests.

This is ready now! 🤓

This will be available in SQLModel 0.0.21, released in the next hours. 🎉

tiangolo merged commit 86ab09f into main Jul 21, 2024
tiangolo deleted the FL-391-support-ondelete-cascade branch July 21, 2024 02:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL