Merge ~pappacena/launchpad:snap-pillar-db-indexes into launchpad:db-devel

Proposed by Thiago F. Pappacena
Status: Superseded
Proposed branch: ~pappacena/launchpad:snap-pillar-db-indexes
Merge into: launchpad:db-devel
Prerequisite: ~pappacena/launchpad:snap-pillar-db
Diff against target: 20 lines (+14/-0)
1 file modified
database/schema/patch-2210-26-2.sql (+14/-0)
Reviewer Review Type Date Requested Status
William Grant db Approve
Review via email:

This proposal has been superseded by a proposal from 2021-02-25.

Commit message

Snap privacy indexes and CHECK constraint validation

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (db)

Unmerged commits

c8875c6... by Thiago F. Pappacena

Snap privacy indexes and CHECK constraint validation

a44145f... by Thiago F. Pappacena

Skipping personmerge sanity checks on SnapSubscription (while we dont have this entity in place)

bcdb89b... by Thiago F. Pappacena

Minor adjustments, and moving large index/constraint creation to another patch

0510967... by Thiago F. Pappacena

Fixing ambiguity in snap_denorm_access

08fb5e5... by Thiago F. Pappacena

Adding Snap.information_type column

9c49e1b... by Thiago F. Pappacena

Adding SnapSubscription model

f2abd3c... by Thiago F. Pappacena

Adding access_policy and access_grants caches to Snap table

ea33cf9... by Thiago F. Pappacena

Adding Snap.project for private Snaps' optional pillars

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/database/schema/patch-2210-26-2.sql b/database/schema/patch-2210-26-2.sql
2new file mode 100644
3index 0000000..ab6e0a3
4--- /dev/null
5+++ b/database/schema/patch-2210-26-2.sql
6@@ -0,0 +1,14 @@
7+-- Copyright 2021 Canonical Ltd. This software is licensed under the
8+-- GNU Affero General Public License version 3 (see the file LICENSE).
10+SET client_min_messages=ERROR;
12+CREATE INDEX snap__project__idx ON Snap(project) WHERE project IS NOT NULL;
14+CREATE UNIQUE INDEX accessartifact__snap__key
15+ ON AccessArtifact(snap) WHERE snap IS NOT NULL;
17+ALTER TABLE AccessArtifact VALIDATE CONSTRAINT has_artifact;
20+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 26, 2);