Merge lp:~wgrant/launchpad/xref-db into lp:launchpad/db-devel
Status: | Merged |
---|---|
Merged at revision: | 13235 |
Proposed branch: | lp:~wgrant/launchpad/xref-db |
Merge into: | lp:launchpad/db-devel |
Diff against target: |
55 lines (+33/-0) 2 files modified
database/schema/patch-2209-70-0.sql (+31/-0) database/schema/security.cfg (+2/-0) |
To merge this branch: | bzr merge lp:~wgrant/launchpad/xref-db |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson (community) | db | Approve | |
Review via email: mp+272587@code.launchpad.net |
Commit message
Add an XRef table for generic cross-references between artifacts.
Description of the change
Add an XRef table for generic cross-references between artifacts.
Model code is at <https:/
An artifact is identified as a tuple of two Unicode strings: ('type', 'id'). Examples from the initial series include ('bug', '1'), ('specification', '10'), ('question', '100') and ('cve', '2015-0001').
To optimise SQL joins against tables with integral PKs, *_id_int columns are available and populated automatically if the ID looks like a decimal number.
Model code automatically creates links in both directions. This won't always be the case when the table can also refer to remote objects, but it makes queries faster and easier today.