|
|
|
|
|
by neillyons
558 days ago
|
|
Yep, Django's on_delete behaviour being implemented in Python instead of SQL has caught me out a few times over the years. I often do `on_delete=models.DO_NOTHING, db_constraint=False` and add the on delete cascade constraint manually to the migration file. https://stackoverflow.com/a/78668897/288424 Same goes for `default. Prior to `db_default` I'd often edit the migration file and set the default in SQL. I much prefer Elixir's Ecto now. |
|