Project

General

Profile

Actions

Feature #2574

closed

Dbo: Consider defaulting to deferred foreign key constraints when available

Added by Bruce Toll over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
01/19/2014
Due date:
% Done:

0%

Estimated time:

Description

Foreign key constraints with "DEFERRABLE INITIALLY DEFERRED" may permit more flexible ordering of Dbo operations (where supported). Though the use cases may be different, I believe that Django sets this default for some of their supported backends, including Postgres.

The attached patch provides for "DEFERRABLE INITIALLY DEFERRED" foreign key constraints with the Postgres and Sqlite3 Dbo backends. The patch also enables dbo_test17 for these backends.

This patch could impact portability between supported Dbo backends, for users who rely on Dbo to create schemas.

Patch is formatted with "git format-patch" against github master 3.3.1-22-g11485bb. It has only been lightly tested.


Files

Actions #1

Updated by Koen Deforche about 10 years ago

  • Status changed from New to Feedback
  • Assignee set to Koen Deforche
  • Target version set to 3.3.2

Hey,

That sounds really interesting. I guess it will fix this old and annoying issue on databases that support this syntax: http://redmine.emweb.be/issues/1280 ?

Regards,

koen

Actions #2

Updated by Bruce Toll about 10 years ago

Hey Koen,

Thanks for following-up. I tested the sample code attached to #1280 with the patched github version and it works without the flush().

Regards,

---Bruce

Actions #3

Updated by Koen Deforche about 10 years ago

  • Status changed from Feedback to InProgress
Actions #4

Updated by Koen Deforche about 10 years ago

  • Status changed from InProgress to Resolved

Hey Bruce,

Fantastic find and work, and sorry for my redundant question: the patch already indicated how it could enable the test case that we were struggling with!

Regards,

koen

Actions #5

Updated by Koen Deforche about 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF