1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00
phorge-phorge/resources/sql/patches/repository-lint.sql
vrana 23a046b3cd Allow saving lint errors to database
Summary: This saves lint errors to the path change of current commit. It requires pushed revision. It doesn't save difference from previous commit mentioned in T2038#comment-4 - I don't plan doing it after all, everything would be much more complicated and the amount of data saved with this approach isn't that bad.

Test Plan: Applied patch, ran script, verified DB.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3899
2012-11-08 15:39:43 -08:00

24 lines
731 B
SQL

CREATE TABLE {$NAMESPACE}_repository.repository_branch (
id int unsigned NOT NULL AUTO_INCREMENT,
repositoryID int unsigned NOT NULL,
name varchar(255) NOT NULL,
lintCommit varchar(40),
dateCreated int unsigned NOT NULL,
dateModified int unsigned NOT NULL,
UNIQUE (repositoryID, name),
PRIMARY KEY (id)
);
CREATE TABLE {$NAMESPACE}_repository.repository_lintmessage (
id int unsigned NOT NULL AUTO_INCREMENT,
branchID int unsigned NOT NULL,
path varchar(512) NOT NULL,
line int unsigned NOT NULL,
code varchar(32) NOT NULL,
severity varchar(16) NOT NULL,
name varchar(255) NOT NULL,
description text NOT NULL,
INDEX (branchID, path(64)),
INDEX (branchID, code, path(64)),
PRIMARY KEY (id)
);