Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ForeignKeyField(on_delete=NO_ACTION) #1393

Closed
nc7s opened this issue May 20, 2023 · 2 comments
Closed

Allow ForeignKeyField(on_delete=NO_ACTION) #1393

nc7s opened this issue May 20, 2023 · 2 comments

Comments

@nc7s
Copy link

nc7s commented May 20, 2023

Is your feature request related to a problem? Please describe.

I'd like to keep some rows when those their foreign key referenced were deleted, either for inspection or for later reuse.

Describe the solution you'd like

Allow that. I'm happy to implement, if you think it's feasible.

@divadsn
Copy link

divadsn commented May 22, 2023

@nc7s
Copy link
Author

nc7s commented May 22, 2023

Yep, I've used the similar DO_NOTHING in Django (although NO_ACTION seems more formal).

waketzheng added a commit to waketzheng/tortoise-orm that referenced this issue Jul 17, 2023
waketzheng added a commit to waketzheng/tortoise-orm that referenced this issue Jul 17, 2023
long2ice added a commit that referenced this issue Jul 20, 2023
…TION) (#1410)

* ci: add python3.11

* fix: testcase error with python3.11 (#1308)

* Compare safe schema sql with github action result

* chore: add comment

* Allow ForeignKeyField(on_delete=NO_ACTION) (#1393)

* fix Codacy complaint

* Update pydantic example to use OnDelete Enum

---------

Co-authored-by: long2ice <long2ice@gmail.com>
esrehmki pushed a commit to esrehmki/tortoise-orm that referenced this issue Aug 17, 2023
…TION) (tortoise#1410)

* ci: add python3.11

* fix: testcase error with python3.11 (tortoise#1308)

* Compare safe schema sql with github action result

* chore: add comment

* Allow ForeignKeyField(on_delete=NO_ACTION) (tortoise#1393)

* fix Codacy complaint

* Update pydantic example to use OnDelete Enum

---------

Co-authored-by: long2ice <long2ice@gmail.com>
@nc7s nc7s closed this as completed Nov 3, 2023
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

No branches or pull requests

2 participants