forked from sourcegraph/sourcegraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rank] adding definition and references tables for ranking job (sourc…
- Loading branch information
1 parent
a071a07
commit 4a20c86
Showing
6 changed files
with
345 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
migrations/frontend/1677005673_add_codeintel_rank_defintions_and_references/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DROP TABLE IF EXISTS codeintel_ranking_definitions; | ||
DROP TABLE IF EXISTS codeintel_ranking_references; |
2 changes: 2 additions & 0 deletions
2
migrations/frontend/1677005673_add_codeintel_rank_defintions_and_references/metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name: add_codeintel_rank_defintions_and_references | ||
parents: [1676996650] |
23 changes: 23 additions & 0 deletions
23
migrations/frontend/1677005673_add_codeintel_rank_defintions_and_references/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
CREATE TABLE IF NOT EXISTS codeintel_ranking_definitions ( | ||
id bigserial PRIMARY KEY NOT NULL, | ||
upload_id int NOT NULL, | ||
symbol_name text NOT NULL, | ||
repository text NOT NULL, | ||
document_path text NOT NULL, | ||
graph_key text NOT NULL | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS codeintel_ranking_definitions_upload_id ON codeintel_ranking_definitions (upload_id); | ||
CREATE INDEX IF NOT EXISTS codeintel_ranking_definitions_symbol_name ON codeintel_ranking_definitions (symbol_name); | ||
|
||
CREATE TABLE IF NOT EXISTS codeintel_ranking_references ( | ||
id bigserial PRIMARY KEY NOT NULL, | ||
upload_id int NOT NULL, | ||
symbol_names text[] NOT NULL, | ||
graph_key text NOT NULL, | ||
processed boolean NOT NULL DEFAULT false | ||
); | ||
|
||
COMMENT ON TABLE codeintel_ranking_references IS 'References for a given upload proceduced by background job consuming SCIP indexes.'; | ||
|
||
CREATE INDEX IF NOT EXISTS codeintel_ranking_references_upload_id ON codeintel_ranking_references (upload_id); |
Oops, something went wrong.