diff options
author | Magnus Hagander | 2023-07-12 11:27:21 +0000 |
---|---|---|
committer | Magnus Hagander | 2023-07-12 11:27:21 +0000 |
commit | 5fed85e3d9707a07caf8a39758ab959056c0f0b3 (patch) | |
tree | aed53a3287e1300133f3b8622a7b049c652d8738 /postgresqleu/util/request.py | |
parent | a66b28d89b7f8d3423b0b9e9a534804337ae4bda (diff) |
Add several unique indexes/constraints
* Convert all invoice references to be OneToOneField. This will cause
django to create a UNIQUE constraint on the foreign key column (which
works fine since it's NULLable in the cases needed). And there should
never be two objects (e.g. registrations) referencing a single invoice
without going through an intermediate object (like a bulkpay object).
* Create unique indexes on (attendee, conference) and (email, conference)
in confreg. This has been code-level-enforced for several years since
multiregs were created, but has not had constraints due to old data
being incorrect. And it's happened at least once that this caused a
race condition - so create the expected constraints. This step may
require manual cleanup of databases if the migration fails with a
unique violation.
* Create unique indexes on (conference, trackname) and (conference, roomname).
* Set some default ordering to be more reasonable.
Diffstat (limited to 'postgresqleu/util/request.py')
0 files changed, 0 insertions, 0 deletions