Skip to content

Implement FileStore.instance_wide

Colin Watson requested to merge cjwatson/debusine:file-store-instance-wide into devel

Database unique constraints can only operate on a single table, so to implement the constraint on non-instance-wide stores we have to mirror the instance_wide field into FileStoreInScope. For proper integrity, it seems much safer to do this using triggers rather than relying on keeping it perfectly in sync at the application level. We use a pair of triggers to copy the field value over when a row in either table is inserted or updated.

Part of #682 (closed).

Merge request reports

Loading