Re: [sqlalchemy] ORM-level “delete” cascade vs. FOREIGN KEY level “ON DELETE” cascade explanation

2019-10-09 Thread Mike Bayer
On Wed, Oct 9, 2019, at 5:14 AM, 'Marc Vegetti' via sqlalchemy wrote: > Hello, > > I'm currently auditing a database which uses sqlalchemy 1.1.9 and PostgreSQL > 10 with Python 3.5. > > There are a few foreign keys which are set to *ON DELETE CASCADE* on the > database but are not set as

[sqlalchemy] ORM-level “delete” cascade vs. FOREIGN KEY level “ON DELETE” cascade explanation

2019-10-09 Thread 'Marc Vegetti' via sqlalchemy
Hello, I'm currently auditing a database which uses sqlalchemy 1.1.9 and PostgreSQL 10 with Python 3.5. There are a few foreign keys which are set to *ON DELETE CASCADE* on the database but are not set as such on the ORM side. My first thought was to simply add in the ForeignKey, a