internal/store/migrations/0083_security_dismissals.up.sql

4a511e42574ead9c92dc73fd320f296cc4dbea07
gitbay/internal/store/migrations/0083_security_dismissals.up.sql

16 lines · 786 bytes

 1-- A finding a repository dismissed, by fingerprint, so it stays dismissed
 2-- across scans and line moves. Kept while scanning is off: turning it back
 3-- on does not bring back what was decided. by_id is NULL once that
 4-- account is gone.
 5CREATE TABLE security_dismissals (
 6    repo_id     INTEGER NOT NULL REFERENCES repos(id) ON DELETE CASCADE,
 7    fingerprint TEXT NOT NULL,
 8    reason      TEXT NOT NULL,
 9    by_id       INTEGER REFERENCES users(id) ON DELETE SET NULL,
10    created_at  TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')),
11    PRIMARY KEY (repo_id, fingerprint)
12);
13
14-- What the last scan set aside rather than reported (codescan.Aside, as
15-- JSON), so a change in it rewrites the issue.
16ALTER TABLE security_scans ADD COLUMN aside TEXT NOT NULL DEFAULT '';
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form