LSIF: Remove tables from schema (#46127)

This commit is contained in:
Eric Fritz 2023-03-01 19:25:42 -06:00 committed by GitHub
parent f4af32f7ef
commit 7b7d02e071
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 900 additions and 3494 deletions

View File

@ -3,5 +3,20 @@
"path": "internal/codeintel/dependencies/internal/store",
"prefix": "TestListPackageRepoRefs",
"reason": "References a column directly in the test that is being dropped post 4.5. No application code references the column"
},
{
"path": "enterprise/internal/codeintel/codenav/internal/lsifstore",
"prefix": "Test",
"reason": "Removing LSIF tables that no longer contain data."
},
{
"path": "enterprise/internal/codeintel/uploads/internal/lsifstore",
"prefix": "Test",
"reason": "Removing LSIF tables that no longer contain data."
},
{
"path": "enterprise/internal/oobmigration/migrations/codeintel",
"prefix": "Test",
"reason": "Removing LSIF tables that no longer contain data."
}
]

View File

@ -11,12 +11,12 @@ import (
"github.com/sourcegraph/sourcegraph/internal/database"
"github.com/sourcegraph/sourcegraph/internal/database/basestore"
"github.com/sourcegraph/sourcegraph/internal/database/dbtest"
)
func TestDiagnosticsCountMigrator(t *testing.T) {
logger := logtest.Scoped(t)
db := database.NewDB(logger, dbtest.NewDB(logger, t))
rawDB := lastDBWithLSIF(logger, t)
db := database.NewDB(logger, rawDB)
store := basestore.NewWithHandle(db.Handle())
migrator := NewDiagnosticsCountMigrator(store, 250, 1)
serializer := newSerializer()

View File

@ -13,12 +13,12 @@ import (
"github.com/sourcegraph/sourcegraph/internal/database"
"github.com/sourcegraph/sourcegraph/internal/database/basestore"
"github.com/sourcegraph/sourcegraph/internal/database/dbtest"
)
func TestDocumentColumnSplitMigrator(t *testing.T) {
logger := logtest.Scoped(t)
db := database.NewDB(logger, dbtest.NewDB(logger, t))
rawDB := lastDBWithLSIF(logger, t)
db := database.NewDB(logger, rawDB)
store := basestore.NewWithHandle(db.Handle())
migrator := NewDocumentColumnSplitMigrator(store, 250, 1)
serializer := newSerializer()

View File

@ -12,12 +12,12 @@ import (
"github.com/sourcegraph/sourcegraph/internal/database"
"github.com/sourcegraph/sourcegraph/internal/database/basestore"
"github.com/sourcegraph/sourcegraph/internal/database/dbtest"
)
func TestLocationsCountMigrator(t *testing.T) {
logger := logtest.Scoped(t)
db := database.NewDB(logger, dbtest.NewDB(logger, t))
rawDB := lastDBWithLSIF(logger, t)
db := database.NewDB(logger, rawDB)
store := basestore.NewWithHandle(db.Handle())
migrator := newLocationsCountMigrator(store, 10, time.Second, "lsif_data_definitions", 250, 1)
serializer := newSerializer()

View File

@ -2,10 +2,12 @@ package codeintel
import (
"context"
"database/sql"
"testing"
"time"
"github.com/keegancsmith/sqlf"
"github.com/sourcegraph/log"
"github.com/sourcegraph/log/logtest"
"github.com/sourcegraph/sourcegraph/internal/database"
@ -16,7 +18,8 @@ import (
func TestMigratorRemovesBoundsWithoutData(t *testing.T) {
logger := logtest.Scoped(t)
db := database.NewDB(logger, dbtest.NewDB(logger, t))
rawDB := lastDBWithLSIF(logger, t)
db := database.NewDB(logger, rawDB)
store := basestore.NewWithHandle(db.Handle())
driver := &testMigrationDriver{}
migrator := newMigrator(store, driver, migratorOptions{
@ -144,3 +147,7 @@ func (m *testMigrationDriver) MigrateRowDown(scanner dbutil.Scanner) ([]any, err
return []any{a, b - c}, nil
}
func lastDBWithLSIF(logger log.Logger, t *testing.T) *sql.DB {
return dbtest.NewDBAtRev(logger, t, "4.5.0")
}

View File

@ -10,7 +10,6 @@ import (
stores "github.com/sourcegraph/sourcegraph/enterprise/internal/codeintel/shared"
"github.com/sourcegraph/sourcegraph/internal/database"
"github.com/sourcegraph/sourcegraph/internal/database/basestore"
"github.com/sourcegraph/sourcegraph/internal/database/dbtest"
)
func init() {
@ -21,9 +20,7 @@ func init() {
func TestSCIPMigrator(t *testing.T) {
logger := logtest.Scoped(t)
// TODO - use the AtRev constructor after this has been deprecated
rawDB := dbtest.NewDB(logger, t)
// rawDB := dbtest.NewDBAtRev(logger, t, "4.3.0")
rawDB := lastDBWithLSIF(logger, t)
db := database.NewDB(logger, rawDB)
codeIntelDB := stores.NewCodeIntelDB(logger, rawDB)
store := basestore.NewWithHandle(db.Handle())

View File

@ -27,5 +27,5 @@ var MinVersion = oobmigration.NewVersion(3, 20)
// can continue to run on their last pre-deprecation version. This code is still ran by the
// migrator, but only on a schema shape that existed in the past.
var FrozenRevisions = []string{
"4.3.0",
"4.5.0",
}

File diff suppressed because one or more lines are too long

View File

@ -969,891 +969,6 @@
"Constraints": null,
"Triggers": []
},
{
"Name": "lsif_data_definitions",
"Comment": "Associates (document, range) pairs with the import monikers attached to the range.",
"Columns": [
{
"Name": "data",
"Index": 4,
"TypeName": "bytea",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A gob-encoded payload conforming to an array of [LocationData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L106:6) types."
},
{
"Name": "dump_id",
"Index": 1,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The identifier of the associated dump in the lsif_uploads table (state=completed)."
},
{
"Name": "identifier",
"Index": 3,
"TypeName": "text",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The moniker identifier."
},
{
"Name": "num_locations",
"Index": 6,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The number of locations stored in the data field."
},
{
"Name": "schema_version",
"Index": 5,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The schema version of this row - used to determine presence and encoding of data."
},
{
"Name": "scheme",
"Index": 2,
"TypeName": "text",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The moniker scheme."
}
],
"Indexes": [
{
"Name": "lsif_data_definitions_pkey",
"IsPrimaryKey": true,
"IsUnique": true,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE UNIQUE INDEX lsif_data_definitions_pkey ON lsif_data_definitions USING btree (dump_id, scheme, identifier)",
"ConstraintType": "p",
"ConstraintDefinition": "PRIMARY KEY (dump_id, scheme, identifier)"
},
{
"Name": "lsif_data_definitions_dump_id_schema_version",
"IsPrimaryKey": false,
"IsUnique": false,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE INDEX lsif_data_definitions_dump_id_schema_version ON lsif_data_definitions USING btree (dump_id, schema_version)",
"ConstraintType": "",
"ConstraintDefinition": ""
}
],
"Constraints": null,
"Triggers": [
{
"Name": "lsif_data_definitions_schema_versions_insert",
"Definition": "CREATE TRIGGER lsif_data_definitions_schema_versions_insert AFTER INSERT ON lsif_data_definitions REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_definitions_schema_versions_insert()"
}
]
},
{
"Name": "lsif_data_definitions_schema_versions",
"Comment": "Tracks the range of schema_versions for each upload in the lsif_data_definitions table.",
"Columns": [
{
"Name": "dump_id",
"Index": 1,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The identifier of the associated dump in the lsif_uploads table."
},
{
"Name": "max_schema_version",
"Index": 3,
"TypeName": "integer",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "An upper-bound on the `lsif_data_definitions.schema_version` where `lsif_data_definitions.dump_id = dump_id`."
},
{
"Name": "min_schema_version",
"Index": 2,
"TypeName": "integer",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A lower-bound on the `lsif_data_definitions.schema_version` where `lsif_data_definitions.dump_id = dump_id`."
}
],
"Indexes": [
{
"Name": "lsif_data_definitions_schema_versions_pkey",
"IsPrimaryKey": true,
"IsUnique": true,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE UNIQUE INDEX lsif_data_definitions_schema_versions_pkey ON lsif_data_definitions_schema_versions USING btree (dump_id)",
"ConstraintType": "p",
"ConstraintDefinition": "PRIMARY KEY (dump_id)"
},
{
"Name": "lsif_data_definitions_schema_versions_dump_id_schema_version_bo",
"IsPrimaryKey": false,
"IsUnique": false,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE INDEX lsif_data_definitions_schema_versions_dump_id_schema_version_bo ON lsif_data_definitions_schema_versions USING btree (dump_id, min_schema_version, max_schema_version)",
"ConstraintType": "",
"ConstraintDefinition": ""
}
],
"Constraints": null,
"Triggers": []
},
{
"Name": "lsif_data_documents",
"Comment": "Stores reference, hover text, moniker, and diagnostic data about a particular text document witin a dump.",
"Columns": [
{
"Name": "data",
"Index": 3,
"TypeName": "bytea",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A gob-encoded payload conforming to the [DocumentData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L13:6) type. This field is being migrated across ranges, hovers, monikers, packages, and diagnostics columns and will be removed in a future release of Sourcegraph."
},
{
"Name": "diagnostics",
"Index": 10,
"TypeName": "bytea",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A gob-encoded payload conforming to the [Diagnostics](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L18:2) field of the DocumentDatatype."
},
{
"Name": "dump_id",
"Index": 1,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The identifier of the associated dump in the lsif_uploads table (state=completed)."
},
{
"Name": "hovers",
"Index": 7,
"TypeName": "bytea",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A gob-encoded payload conforming to the [HoversResults](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L15:2) field of the DocumentDatatype."
},
{
"Name": "monikers",
"Index": 8,
"TypeName": "bytea",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A gob-encoded payload conforming to the [Monikers](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L16:2) field of the DocumentDatatype."
},
{
"Name": "num_diagnostics",
"Index": 5,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The number of diagnostics stored in the data field."
},
{
"Name": "packages",
"Index": 9,
"TypeName": "bytea",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A gob-encoded payload conforming to the [PackageInformation](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L17:2) field of the DocumentDatatype."
},
{
"Name": "path",
"Index": 2,
"TypeName": "text",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The path of the text document relative to the associated dump root."
},
{
"Name": "ranges",
"Index": 6,
"TypeName": "bytea",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A gob-encoded payload conforming to the [Ranges](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L14:2) field of the DocumentDatatype."
},
{
"Name": "schema_version",
"Index": 4,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The schema version of this row - used to determine presence and encoding of data."
}
],
"Indexes": [
{
"Name": "lsif_data_documents_pkey",
"IsPrimaryKey": true,
"IsUnique": true,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE UNIQUE INDEX lsif_data_documents_pkey ON lsif_data_documents USING btree (dump_id, path)",
"ConstraintType": "p",
"ConstraintDefinition": "PRIMARY KEY (dump_id, path)"
},
{
"Name": "lsif_data_documents_dump_id_schema_version",
"IsPrimaryKey": false,
"IsUnique": false,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE INDEX lsif_data_documents_dump_id_schema_version ON lsif_data_documents USING btree (dump_id, schema_version)",
"ConstraintType": "",
"ConstraintDefinition": ""
}
],
"Constraints": null,
"Triggers": [
{
"Name": "lsif_data_documents_schema_versions_insert",
"Definition": "CREATE TRIGGER lsif_data_documents_schema_versions_insert AFTER INSERT ON lsif_data_documents REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_documents_schema_versions_insert()"
}
]
},
{
"Name": "lsif_data_documents_schema_versions",
"Comment": "Tracks the range of schema_versions for each upload in the lsif_data_documents table.",
"Columns": [
{
"Name": "dump_id",
"Index": 1,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The identifier of the associated dump in the lsif_uploads table."
},
{
"Name": "max_schema_version",
"Index": 3,
"TypeName": "integer",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "An upper-bound on the `lsif_data_documents.schema_version` where `lsif_data_documents.dump_id = dump_id`."
},
{
"Name": "min_schema_version",
"Index": 2,
"TypeName": "integer",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A lower-bound on the `lsif_data_documents.schema_version` where `lsif_data_documents.dump_id = dump_id`."
}
],
"Indexes": [
{
"Name": "lsif_data_documents_schema_versions_pkey",
"IsPrimaryKey": true,
"IsUnique": true,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE UNIQUE INDEX lsif_data_documents_schema_versions_pkey ON lsif_data_documents_schema_versions USING btree (dump_id)",
"ConstraintType": "p",
"ConstraintDefinition": "PRIMARY KEY (dump_id)"
},
{
"Name": "lsif_data_documents_schema_versions_dump_id_schema_version_boun",
"IsPrimaryKey": false,
"IsUnique": false,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE INDEX lsif_data_documents_schema_versions_dump_id_schema_version_boun ON lsif_data_documents_schema_versions USING btree (dump_id, min_schema_version, max_schema_version)",
"ConstraintType": "",
"ConstraintDefinition": ""
}
],
"Constraints": null,
"Triggers": []
},
{
"Name": "lsif_data_implementations",
"Comment": "Associates (document, range) pairs with the implementation monikers attached to the range.",
"Columns": [
{
"Name": "data",
"Index": 4,
"TypeName": "bytea",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A gob-encoded payload conforming to an array of [LocationData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L106:6) types."
},
{
"Name": "dump_id",
"Index": 1,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The identifier of the associated dump in the lsif_uploads table (state=completed)."
},
{
"Name": "identifier",
"Index": 3,
"TypeName": "text",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The moniker identifier."
},
{
"Name": "num_locations",
"Index": 6,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The number of locations stored in the data field."
},
{
"Name": "schema_version",
"Index": 5,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The schema version of this row - used to determine presence and encoding of data."
},
{
"Name": "scheme",
"Index": 2,
"TypeName": "text",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The moniker scheme."
}
],
"Indexes": [
{
"Name": "lsif_data_implementations_pkey",
"IsPrimaryKey": true,
"IsUnique": true,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE UNIQUE INDEX lsif_data_implementations_pkey ON lsif_data_implementations USING btree (dump_id, scheme, identifier)",
"ConstraintType": "p",
"ConstraintDefinition": "PRIMARY KEY (dump_id, scheme, identifier)"
},
{
"Name": "lsif_data_implementations_dump_id_schema_version",
"IsPrimaryKey": false,
"IsUnique": false,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE INDEX lsif_data_implementations_dump_id_schema_version ON lsif_data_implementations USING btree (dump_id, schema_version)",
"ConstraintType": "",
"ConstraintDefinition": ""
}
],
"Constraints": null,
"Triggers": [
{
"Name": "lsif_data_implementations_schema_versions_insert",
"Definition": "CREATE TRIGGER lsif_data_implementations_schema_versions_insert AFTER INSERT ON lsif_data_implementations REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_implementations_schema_versions_insert()"
}
]
},
{
"Name": "lsif_data_implementations_schema_versions",
"Comment": "Tracks the range of schema_versions for each upload in the lsif_data_implementations table.",
"Columns": [
{
"Name": "dump_id",
"Index": 1,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The identifier of the associated dump in the lsif_uploads table."
},
{
"Name": "max_schema_version",
"Index": 3,
"TypeName": "integer",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "An upper-bound on the `lsif_data_implementations.schema_version` where `lsif_data_implementations.dump_id = dump_id`."
},
{
"Name": "min_schema_version",
"Index": 2,
"TypeName": "integer",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A lower-bound on the `lsif_data_implementations.schema_version` where `lsif_data_implementations.dump_id = dump_id`."
}
],
"Indexes": [
{
"Name": "lsif_data_implementations_schema_versions_pkey",
"IsPrimaryKey": true,
"IsUnique": true,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE UNIQUE INDEX lsif_data_implementations_schema_versions_pkey ON lsif_data_implementations_schema_versions USING btree (dump_id)",
"ConstraintType": "p",
"ConstraintDefinition": "PRIMARY KEY (dump_id)"
},
{
"Name": "lsif_data_implementations_schema_versions_dump_id_schema_versio",
"IsPrimaryKey": false,
"IsUnique": false,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE INDEX lsif_data_implementations_schema_versions_dump_id_schema_versio ON lsif_data_implementations_schema_versions USING btree (dump_id, min_schema_version, max_schema_version)",
"ConstraintType": "",
"ConstraintDefinition": ""
}
],
"Constraints": null,
"Triggers": []
},
{
"Name": "lsif_data_metadata",
"Comment": "Stores the number of result chunks associated with a dump.",
"Columns": [
{
"Name": "dump_id",
"Index": 1,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The identifier of the associated dump in the lsif_uploads table (state=completed)."
},
{
"Name": "num_result_chunks",
"Index": 2,
"TypeName": "integer",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A bound of populated indexes in the lsif_data_result_chunks table for the associated dump. This value is used to hash identifiers into the result chunk index to which they belong."
}
],
"Indexes": [
{
"Name": "lsif_data_metadata_pkey",
"IsPrimaryKey": true,
"IsUnique": true,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE UNIQUE INDEX lsif_data_metadata_pkey ON lsif_data_metadata USING btree (dump_id)",
"ConstraintType": "p",
"ConstraintDefinition": "PRIMARY KEY (dump_id)"
}
],
"Constraints": null,
"Triggers": []
},
{
"Name": "lsif_data_references",
"Comment": "Associates (document, range) pairs with the export monikers attached to the range.",
"Columns": [
{
"Name": "data",
"Index": 4,
"TypeName": "bytea",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A gob-encoded payload conforming to an array of [LocationData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L106:6) types."
},
{
"Name": "dump_id",
"Index": 1,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The identifier of the associated dump in the lsif_uploads table (state=completed)."
},
{
"Name": "identifier",
"Index": 3,
"TypeName": "text",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The moniker identifier."
},
{
"Name": "num_locations",
"Index": 6,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The number of locations stored in the data field."
},
{
"Name": "schema_version",
"Index": 5,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The schema version of this row - used to determine presence and encoding of data."
},
{
"Name": "scheme",
"Index": 2,
"TypeName": "text",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The moniker scheme."
}
],
"Indexes": [
{
"Name": "lsif_data_references_pkey",
"IsPrimaryKey": true,
"IsUnique": true,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE UNIQUE INDEX lsif_data_references_pkey ON lsif_data_references USING btree (dump_id, scheme, identifier)",
"ConstraintType": "p",
"ConstraintDefinition": "PRIMARY KEY (dump_id, scheme, identifier)"
},
{
"Name": "lsif_data_references_dump_id_schema_version",
"IsPrimaryKey": false,
"IsUnique": false,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE INDEX lsif_data_references_dump_id_schema_version ON lsif_data_references USING btree (dump_id, schema_version)",
"ConstraintType": "",
"ConstraintDefinition": ""
}
],
"Constraints": null,
"Triggers": [
{
"Name": "lsif_data_references_schema_versions_insert",
"Definition": "CREATE TRIGGER lsif_data_references_schema_versions_insert AFTER INSERT ON lsif_data_references REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_references_schema_versions_insert()"
}
]
},
{
"Name": "lsif_data_references_schema_versions",
"Comment": "Tracks the range of schema_versions for each upload in the lsif_data_references table.",
"Columns": [
{
"Name": "dump_id",
"Index": 1,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The identifier of the associated dump in the lsif_uploads table."
},
{
"Name": "max_schema_version",
"Index": 3,
"TypeName": "integer",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "An upper-bound on the `lsif_data_references.schema_version` where `lsif_data_references.dump_id = dump_id`."
},
{
"Name": "min_schema_version",
"Index": 2,
"TypeName": "integer",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A lower-bound on the `lsif_data_references.schema_version` where `lsif_data_references.dump_id = dump_id`."
}
],
"Indexes": [
{
"Name": "lsif_data_references_schema_versions_pkey",
"IsPrimaryKey": true,
"IsUnique": true,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE UNIQUE INDEX lsif_data_references_schema_versions_pkey ON lsif_data_references_schema_versions USING btree (dump_id)",
"ConstraintType": "p",
"ConstraintDefinition": "PRIMARY KEY (dump_id)"
},
{
"Name": "lsif_data_references_schema_versions_dump_id_schema_version_bou",
"IsPrimaryKey": false,
"IsUnique": false,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE INDEX lsif_data_references_schema_versions_dump_id_schema_version_bou ON lsif_data_references_schema_versions USING btree (dump_id, min_schema_version, max_schema_version)",
"ConstraintType": "",
"ConstraintDefinition": ""
}
],
"Constraints": null,
"Triggers": []
},
{
"Name": "lsif_data_result_chunks",
"Comment": "Associates result set identifiers with the (document path, range identifier) pairs that compose the set.",
"Columns": [
{
"Name": "data",
"Index": 3,
"TypeName": "bytea",
"IsNullable": true,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "A gob-encoded payload conforming to the [ResultChunkData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L76:6) type."
},
{
"Name": "dump_id",
"Index": 1,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The identifier of the associated dump in the lsif_uploads table (state=completed)."
},
{
"Name": "idx",
"Index": 2,
"TypeName": "integer",
"IsNullable": false,
"Default": "",
"CharacterMaximumLength": 0,
"IsIdentity": false,
"IdentityGeneration": "",
"IsGenerated": "NEVER",
"GenerationExpression": "",
"Comment": "The unique result chunk index within the associated dump. Every result set identifier present should hash to this index (modulo lsif_data_metadata.num_result_chunks)."
}
],
"Indexes": [
{
"Name": "lsif_data_result_chunks_pkey",
"IsPrimaryKey": true,
"IsUnique": true,
"IsExclusion": false,
"IsDeferrable": false,
"IndexDefinition": "CREATE UNIQUE INDEX lsif_data_result_chunks_pkey ON lsif_data_result_chunks USING btree (dump_id, idx)",
"ConstraintType": "p",
"ConstraintDefinition": "PRIMARY KEY (dump_id, idx)"
}
],
"Constraints": null,
"Triggers": []
},
{
"Name": "migration_logs",
"Comment": "",

View File

@ -246,267 +246,6 @@ Tracks the range of `schema_versions` for each index in the [`codeintel_scip_sym
**upload_id**: The identifier of the associated SCIP index.
# Table "public.lsif_data_definitions"
```
Column | Type | Collation | Nullable | Default
----------------+---------+-----------+----------+---------
dump_id | integer | | not null |
scheme | text | | not null |
identifier | text | | not null |
data | bytea | | |
schema_version | integer | | not null |
num_locations | integer | | not null |
Indexes:
"lsif_data_definitions_pkey" PRIMARY KEY, btree (dump_id, scheme, identifier)
"lsif_data_definitions_dump_id_schema_version" btree (dump_id, schema_version)
Triggers:
lsif_data_definitions_schema_versions_insert AFTER INSERT ON lsif_data_definitions REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_definitions_schema_versions_insert()
```
Associates (document, range) pairs with the import monikers attached to the range.
**data**: A gob-encoded payload conforming to an array of [LocationData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L106:6) types.
**dump_id**: The identifier of the associated dump in the lsif_uploads table (state=completed).
**identifier**: The moniker identifier.
**num_locations**: The number of locations stored in the data field.
**schema_version**: The schema version of this row - used to determine presence and encoding of data.
**scheme**: The moniker scheme.
# Table "public.lsif_data_definitions_schema_versions"
```
Column | Type | Collation | Nullable | Default
--------------------+---------+-----------+----------+---------
dump_id | integer | | not null |
min_schema_version | integer | | |
max_schema_version | integer | | |
Indexes:
"lsif_data_definitions_schema_versions_pkey" PRIMARY KEY, btree (dump_id)
"lsif_data_definitions_schema_versions_dump_id_schema_version_bo" btree (dump_id, min_schema_version, max_schema_version)
```
Tracks the range of schema_versions for each upload in the lsif_data_definitions table.
**dump_id**: The identifier of the associated dump in the lsif_uploads table.
**max_schema_version**: An upper-bound on the `lsif_data_definitions.schema_version` where `lsif_data_definitions.dump_id = dump_id`.
**min_schema_version**: A lower-bound on the `lsif_data_definitions.schema_version` where `lsif_data_definitions.dump_id = dump_id`.
# Table "public.lsif_data_documents"
```
Column | Type | Collation | Nullable | Default
-----------------+---------+-----------+----------+---------
dump_id | integer | | not null |
path | text | | not null |
data | bytea | | |
schema_version | integer | | not null |
num_diagnostics | integer | | not null |
ranges | bytea | | |
hovers | bytea | | |
monikers | bytea | | |
packages | bytea | | |
diagnostics | bytea | | |
Indexes:
"lsif_data_documents_pkey" PRIMARY KEY, btree (dump_id, path)
"lsif_data_documents_dump_id_schema_version" btree (dump_id, schema_version)
Triggers:
lsif_data_documents_schema_versions_insert AFTER INSERT ON lsif_data_documents REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_documents_schema_versions_insert()
```
Stores reference, hover text, moniker, and diagnostic data about a particular text document witin a dump.
**data**: A gob-encoded payload conforming to the [DocumentData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L13:6) type. This field is being migrated across ranges, hovers, monikers, packages, and diagnostics columns and will be removed in a future release of Sourcegraph.
**diagnostics**: A gob-encoded payload conforming to the [Diagnostics](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L18:2) field of the DocumentDatatype.
**dump_id**: The identifier of the associated dump in the lsif_uploads table (state=completed).
**hovers**: A gob-encoded payload conforming to the [HoversResults](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L15:2) field of the DocumentDatatype.
**monikers**: A gob-encoded payload conforming to the [Monikers](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L16:2) field of the DocumentDatatype.
**num_diagnostics**: The number of diagnostics stored in the data field.
**packages**: A gob-encoded payload conforming to the [PackageInformation](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L17:2) field of the DocumentDatatype.
**path**: The path of the text document relative to the associated dump root.
**ranges**: A gob-encoded payload conforming to the [Ranges](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L14:2) field of the DocumentDatatype.
**schema_version**: The schema version of this row - used to determine presence and encoding of data.
# Table "public.lsif_data_documents_schema_versions"
```
Column | Type | Collation | Nullable | Default
--------------------+---------+-----------+----------+---------
dump_id | integer | | not null |
min_schema_version | integer | | |
max_schema_version | integer | | |
Indexes:
"lsif_data_documents_schema_versions_pkey" PRIMARY KEY, btree (dump_id)
"lsif_data_documents_schema_versions_dump_id_schema_version_boun" btree (dump_id, min_schema_version, max_schema_version)
```
Tracks the range of schema_versions for each upload in the lsif_data_documents table.
**dump_id**: The identifier of the associated dump in the lsif_uploads table.
**max_schema_version**: An upper-bound on the `lsif_data_documents.schema_version` where `lsif_data_documents.dump_id = dump_id`.
**min_schema_version**: A lower-bound on the `lsif_data_documents.schema_version` where `lsif_data_documents.dump_id = dump_id`.
# Table "public.lsif_data_implementations"
```
Column | Type | Collation | Nullable | Default
----------------+---------+-----------+----------+---------
dump_id | integer | | not null |
scheme | text | | not null |
identifier | text | | not null |
data | bytea | | |
schema_version | integer | | not null |
num_locations | integer | | not null |
Indexes:
"lsif_data_implementations_pkey" PRIMARY KEY, btree (dump_id, scheme, identifier)
"lsif_data_implementations_dump_id_schema_version" btree (dump_id, schema_version)
Triggers:
lsif_data_implementations_schema_versions_insert AFTER INSERT ON lsif_data_implementations REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_implementations_schema_versions_insert()
```
Associates (document, range) pairs with the implementation monikers attached to the range.
**data**: A gob-encoded payload conforming to an array of [LocationData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L106:6) types.
**dump_id**: The identifier of the associated dump in the lsif_uploads table (state=completed).
**identifier**: The moniker identifier.
**num_locations**: The number of locations stored in the data field.
**schema_version**: The schema version of this row - used to determine presence and encoding of data.
**scheme**: The moniker scheme.
# Table "public.lsif_data_implementations_schema_versions"
```
Column | Type | Collation | Nullable | Default
--------------------+---------+-----------+----------+---------
dump_id | integer | | not null |
min_schema_version | integer | | |
max_schema_version | integer | | |
Indexes:
"lsif_data_implementations_schema_versions_pkey" PRIMARY KEY, btree (dump_id)
"lsif_data_implementations_schema_versions_dump_id_schema_versio" btree (dump_id, min_schema_version, max_schema_version)
```
Tracks the range of schema_versions for each upload in the lsif_data_implementations table.
**dump_id**: The identifier of the associated dump in the lsif_uploads table.
**max_schema_version**: An upper-bound on the `lsif_data_implementations.schema_version` where `lsif_data_implementations.dump_id = dump_id`.
**min_schema_version**: A lower-bound on the `lsif_data_implementations.schema_version` where `lsif_data_implementations.dump_id = dump_id`.
# Table "public.lsif_data_metadata"
```
Column | Type | Collation | Nullable | Default
-------------------+---------+-----------+----------+---------
dump_id | integer | | not null |
num_result_chunks | integer | | |
Indexes:
"lsif_data_metadata_pkey" PRIMARY KEY, btree (dump_id)
```
Stores the number of result chunks associated with a dump.
**dump_id**: The identifier of the associated dump in the lsif_uploads table (state=completed).
**num_result_chunks**: A bound of populated indexes in the lsif_data_result_chunks table for the associated dump. This value is used to hash identifiers into the result chunk index to which they belong.
# Table "public.lsif_data_references"
```
Column | Type | Collation | Nullable | Default
----------------+---------+-----------+----------+---------
dump_id | integer | | not null |
scheme | text | | not null |
identifier | text | | not null |
data | bytea | | |
schema_version | integer | | not null |
num_locations | integer | | not null |
Indexes:
"lsif_data_references_pkey" PRIMARY KEY, btree (dump_id, scheme, identifier)
"lsif_data_references_dump_id_schema_version" btree (dump_id, schema_version)
Triggers:
lsif_data_references_schema_versions_insert AFTER INSERT ON lsif_data_references REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_references_schema_versions_insert()
```
Associates (document, range) pairs with the export monikers attached to the range.
**data**: A gob-encoded payload conforming to an array of [LocationData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L106:6) types.
**dump_id**: The identifier of the associated dump in the lsif_uploads table (state=completed).
**identifier**: The moniker identifier.
**num_locations**: The number of locations stored in the data field.
**schema_version**: The schema version of this row - used to determine presence and encoding of data.
**scheme**: The moniker scheme.
# Table "public.lsif_data_references_schema_versions"
```
Column | Type | Collation | Nullable | Default
--------------------+---------+-----------+----------+---------
dump_id | integer | | not null |
min_schema_version | integer | | |
max_schema_version | integer | | |
Indexes:
"lsif_data_references_schema_versions_pkey" PRIMARY KEY, btree (dump_id)
"lsif_data_references_schema_versions_dump_id_schema_version_bou" btree (dump_id, min_schema_version, max_schema_version)
```
Tracks the range of schema_versions for each upload in the lsif_data_references table.
**dump_id**: The identifier of the associated dump in the lsif_uploads table.
**max_schema_version**: An upper-bound on the `lsif_data_references.schema_version` where `lsif_data_references.dump_id = dump_id`.
**min_schema_version**: A lower-bound on the `lsif_data_references.schema_version` where `lsif_data_references.dump_id = dump_id`.
# Table "public.lsif_data_result_chunks"
```
Column | Type | Collation | Nullable | Default
---------+---------+-----------+----------+---------
dump_id | integer | | not null |
idx | integer | | not null |
data | bytea | | |
Indexes:
"lsif_data_result_chunks_pkey" PRIMARY KEY, btree (dump_id, idx)
```
Associates result set identifiers with the (document path, range identifier) pairs that compose the set.
**data**: A gob-encoded payload conforming to the [ResultChunkData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L76:6) type.
**dump_id**: The identifier of the associated dump in the lsif_uploads table (state=completed).
**idx**: The unique result chunk index within the associated dump. Every result set identifier present should hash to this index (modulo lsif_data_metadata.num_result_chunks).
# Table "public.migration_logs"
```
Column | Type | Collation | Nullable | Default

View File

@ -0,0 +1,168 @@
CREATE TABLE IF NOT EXISTS lsif_data_definitions (
dump_id integer NOT NULL,
scheme text NOT NULL,
identifier text NOT NULL,
data bytea,
schema_version integer NOT NULL,
num_locations integer NOT NULL,
PRIMARY KEY (dump_id, scheme, identifier)
);
COMMENT ON TABLE lsif_data_definitions IS 'Associates (document, range) pairs with the import monikers attached to the range.';
COMMENT ON COLUMN lsif_data_definitions.dump_id IS 'The identifier of the associated dump in the lsif_uploads table (state=completed).';
COMMENT ON COLUMN lsif_data_definitions.scheme IS 'The moniker scheme.';
COMMENT ON COLUMN lsif_data_definitions.identifier IS 'The moniker identifier.';
COMMENT ON COLUMN lsif_data_definitions.data IS 'A gob-encoded payload conforming to an array of [LocationData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L106:6) types.';
COMMENT ON COLUMN lsif_data_definitions.schema_version IS 'The schema version of this row - used to determine presence and encoding of data.';
COMMENT ON COLUMN lsif_data_definitions.num_locations IS 'The number of locations stored in the data field.';
CREATE TABLE IF NOT EXISTS lsif_data_definitions_schema_versions (
dump_id integer NOT NULL,
min_schema_version integer,
max_schema_version integer,
PRIMARY KEY (dump_id)
);
COMMENT ON TABLE lsif_data_definitions_schema_versions IS 'Tracks the range of schema_versions for each upload in the lsif_data_definitions table.';
COMMENT ON COLUMN lsif_data_definitions_schema_versions.dump_id IS 'The identifier of the associated dump in the lsif_uploads table.';
COMMENT ON COLUMN lsif_data_definitions_schema_versions.min_schema_version IS 'A lower-bound on the `lsif_data_definitions.schema_version` where `lsif_data_definitions.dump_id = dump_id`.';
COMMENT ON COLUMN lsif_data_definitions_schema_versions.max_schema_version IS 'An upper-bound on the `lsif_data_definitions.schema_version` where `lsif_data_definitions.dump_id = dump_id`.';
CREATE TABLE IF NOT EXISTS lsif_data_documents (
dump_id integer NOT NULL,
path text NOT NULL,
data bytea,
schema_version integer NOT NULL,
num_diagnostics integer NOT NULL,
ranges bytea,
hovers bytea,
monikers bytea,
packages bytea,
diagnostics bytea,
PRIMARY KEY (dump_id, path)
);
COMMENT ON TABLE lsif_data_documents IS 'Stores reference, hover text, moniker, and diagnostic data about a particular text document witin a dump.';
COMMENT ON COLUMN lsif_data_documents.dump_id IS 'The identifier of the associated dump in the lsif_uploads table (state=completed).';
COMMENT ON COLUMN lsif_data_documents.path IS 'The path of the text document relative to the associated dump root.';
COMMENT ON COLUMN lsif_data_documents.data IS 'A gob-encoded payload conforming to the [DocumentData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L13:6) type. This field is being migrated across ranges, hovers, monikers, packages, and diagnostics columns and will be removed in a future release of Sourcegraph.';
COMMENT ON COLUMN lsif_data_documents.schema_version IS 'The schema version of this row - used to determine presence and encoding of data.';
COMMENT ON COLUMN lsif_data_documents.num_diagnostics IS 'The number of diagnostics stored in the data field.';
COMMENT ON COLUMN lsif_data_documents.ranges IS 'A gob-encoded payload conforming to the [Ranges](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L14:2) field of the DocumentDatatype.';
COMMENT ON COLUMN lsif_data_documents.hovers IS 'A gob-encoded payload conforming to the [HoversResults](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L15:2) field of the DocumentDatatype.';
COMMENT ON COLUMN lsif_data_documents.monikers IS 'A gob-encoded payload conforming to the [Monikers](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L16:2) field of the DocumentDatatype.';
COMMENT ON COLUMN lsif_data_documents.packages IS 'A gob-encoded payload conforming to the [PackageInformation](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L17:2) field of the DocumentDatatype.';
COMMENT ON COLUMN lsif_data_documents.diagnostics IS 'A gob-encoded payload conforming to the [Diagnostics](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L18:2) field of the DocumentDatatype.';
CREATE TABLE IF NOT EXISTS lsif_data_documents_schema_versions (
dump_id integer NOT NULL,
min_schema_version integer,
max_schema_version integer,
PRIMARY KEY (dump_id)
);
COMMENT ON TABLE lsif_data_documents_schema_versions IS 'Tracks the range of schema_versions for each upload in the lsif_data_documents table.';
COMMENT ON COLUMN lsif_data_documents_schema_versions.dump_id IS 'The identifier of the associated dump in the lsif_uploads table.';
COMMENT ON COLUMN lsif_data_documents_schema_versions.min_schema_version IS 'A lower-bound on the `lsif_data_documents.schema_version` where `lsif_data_documents.dump_id = dump_id`.';
COMMENT ON COLUMN lsif_data_documents_schema_versions.max_schema_version IS 'An upper-bound on the `lsif_data_documents.schema_version` where `lsif_data_documents.dump_id = dump_id`.';
CREATE TABLE IF NOT EXISTS lsif_data_implementations (
dump_id integer NOT NULL,
scheme text NOT NULL,
identifier text NOT NULL,
data bytea,
schema_version integer NOT NULL,
num_locations integer NOT NULL,
PRIMARY KEY (dump_id, scheme, identifier)
);
COMMENT ON TABLE lsif_data_implementations IS 'Associates (document, range) pairs with the implementation monikers attached to the range.';
COMMENT ON COLUMN lsif_data_implementations.dump_id IS 'The identifier of the associated dump in the lsif_uploads table (state=completed).';
COMMENT ON COLUMN lsif_data_implementations.scheme IS 'The moniker scheme.';
COMMENT ON COLUMN lsif_data_implementations.identifier IS 'The moniker identifier.';
COMMENT ON COLUMN lsif_data_implementations.data IS 'A gob-encoded payload conforming to an array of [LocationData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L106:6) types.';
COMMENT ON COLUMN lsif_data_implementations.schema_version IS 'The schema version of this row - used to determine presence and encoding of data.';
COMMENT ON COLUMN lsif_data_implementations.num_locations IS 'The number of locations stored in the data field.';
CREATE TABLE IF NOT EXISTS lsif_data_implementations_schema_versions (
dump_id integer NOT NULL,
min_schema_version integer,
max_schema_version integer,
PRIMARY KEY (dump_id)
);
COMMENT ON TABLE lsif_data_implementations_schema_versions IS 'Tracks the range of schema_versions for each upload in the lsif_data_implementations table.';
COMMENT ON COLUMN lsif_data_implementations_schema_versions.dump_id IS 'The identifier of the associated dump in the lsif_uploads table.';
COMMENT ON COLUMN lsif_data_implementations_schema_versions.min_schema_version IS 'A lower-bound on the `lsif_data_implementations.schema_version` where `lsif_data_implementations.dump_id = dump_id`.';
COMMENT ON COLUMN lsif_data_implementations_schema_versions.max_schema_version IS 'An upper-bound on the `lsif_data_implementations.schema_version` where `lsif_data_implementations.dump_id = dump_id`.';
CREATE TABLE IF NOT EXISTS lsif_data_metadata (
dump_id integer NOT NULL,
num_result_chunks integer,
PRIMARY KEY (dump_id)
);
COMMENT ON TABLE lsif_data_metadata IS 'Stores the number of result chunks associated with a dump.';
COMMENT ON COLUMN lsif_data_metadata.dump_id IS 'The identifier of the associated dump in the lsif_uploads table (state=completed).';
COMMENT ON COLUMN lsif_data_metadata.num_result_chunks IS 'A bound of populated indexes in the lsif_data_result_chunks table for the associated dump. This value is used to hash identifiers into the result chunk index to which they belong.';
CREATE TABLE IF NOT EXISTS lsif_data_references (
dump_id integer NOT NULL,
scheme text NOT NULL,
identifier text NOT NULL,
data bytea,
schema_version integer NOT NULL,
num_locations integer NOT NULL,
PRIMARY KEY (dump_id, scheme, identifier)
);
COMMENT ON TABLE lsif_data_references IS 'Associates (document, range) pairs with the export monikers attached to the range.';
COMMENT ON COLUMN lsif_data_references.dump_id IS 'The identifier of the associated dump in the lsif_uploads table (state=completed).';
COMMENT ON COLUMN lsif_data_references.scheme IS 'The moniker scheme.';
COMMENT ON COLUMN lsif_data_references.identifier IS 'The moniker identifier.';
COMMENT ON COLUMN lsif_data_references.data IS 'A gob-encoded payload conforming to an array of [LocationData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L106:6) types.';
COMMENT ON COLUMN lsif_data_references.schema_version IS 'The schema version of this row - used to determine presence and encoding of data.';
COMMENT ON COLUMN lsif_data_references.num_locations IS 'The number of locations stored in the data field.';
CREATE TABLE IF NOT EXISTS lsif_data_references_schema_versions (
dump_id integer NOT NULL,
min_schema_version integer,
max_schema_version integer,
PRIMARY KEY (dump_id)
);
COMMENT ON TABLE lsif_data_references_schema_versions IS 'Tracks the range of schema_versions for each upload in the lsif_data_references table.';
COMMENT ON COLUMN lsif_data_references_schema_versions.dump_id IS 'The identifier of the associated dump in the lsif_uploads table.';
COMMENT ON COLUMN lsif_data_references_schema_versions.min_schema_version IS 'A lower-bound on the `lsif_data_references.schema_version` where `lsif_data_references.dump_id = dump_id`.';
COMMENT ON COLUMN lsif_data_references_schema_versions.max_schema_version IS 'An upper-bound on the `lsif_data_references.schema_version` where `lsif_data_references.dump_id = dump_id`.';
CREATE TABLE IF NOT EXISTS lsif_data_result_chunks (
dump_id integer NOT NULL,
idx integer NOT NULL,
data bytea,
PRIMARY KEY (dump_id, idx)
);
COMMENT ON TABLE lsif_data_result_chunks IS 'Associates result set identifiers with the (document path, range identifier) pairs that compose the set.';
COMMENT ON COLUMN lsif_data_result_chunks.dump_id IS 'The identifier of the associated dump in the lsif_uploads table (state=completed).';
COMMENT ON COLUMN lsif_data_result_chunks.idx IS 'The unique result chunk index within the associated dump. Every result set identifier present should hash to this index (modulo lsif_data_metadata.num_result_chunks).';
COMMENT ON COLUMN lsif_data_result_chunks.data IS 'A gob-encoded payload conforming to the [ResultChunkData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L76:6) type.';
CREATE INDEX IF NOT EXISTS lsif_data_definitions_dump_id_schema_version ON lsif_data_definitions USING btree (dump_id, schema_version);
CREATE INDEX IF NOT EXISTS lsif_data_definitions_schema_versions_dump_id_schema_version_bo ON lsif_data_definitions_schema_versions USING btree (dump_id, min_schema_version, max_schema_version);
CREATE INDEX IF NOT EXISTS lsif_data_documents_dump_id_schema_version ON lsif_data_documents USING btree (dump_id, schema_version);
CREATE INDEX IF NOT EXISTS lsif_data_documents_schema_versions_dump_id_schema_version_boun ON lsif_data_documents_schema_versions USING btree (dump_id, min_schema_version, max_schema_version);
CREATE INDEX IF NOT EXISTS lsif_data_implementations_dump_id_schema_version ON lsif_data_implementations USING btree (dump_id, schema_version);
CREATE INDEX IF NOT EXISTS lsif_data_implementations_schema_versions_dump_id_schema_versio ON lsif_data_implementations_schema_versions USING btree (dump_id, min_schema_version, max_schema_version);
CREATE INDEX IF NOT EXISTS lsif_data_references_dump_id_schema_version ON lsif_data_references USING btree (dump_id, schema_version);
CREATE INDEX IF NOT EXISTS lsif_data_references_schema_versions_dump_id_schema_version_bou ON lsif_data_references_schema_versions USING btree (dump_id, min_schema_version, max_schema_version);
DROP TRIGGER IF EXISTS lsif_data_definitions_schema_versions_insert ON lsif_data_definitions;
DROP TRIGGER IF EXISTS lsif_data_documents_schema_versions_insert ON lsif_data_documents;
DROP TRIGGER IF EXISTS lsif_data_implementations_schema_versions_insert ON lsif_data_implementations;
DROP TRIGGER IF EXISTS lsif_data_references_schema_versions_insert ON lsif_data_references;
CREATE TRIGGER lsif_data_definitions_schema_versions_insert AFTER INSERT ON lsif_data_definitions REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_definitions_schema_versions_insert();
CREATE TRIGGER lsif_data_documents_schema_versions_insert AFTER INSERT ON lsif_data_documents REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_documents_schema_versions_insert();
CREATE TRIGGER lsif_data_implementations_schema_versions_insert AFTER INSERT ON lsif_data_implementations REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_implementations_schema_versions_insert();
CREATE TRIGGER lsif_data_references_schema_versions_insert AFTER INSERT ON lsif_data_references REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_references_schema_versions_insert();

View File

@ -0,0 +1,2 @@
name: Remove LSIF data
parents: [1671059396]

View File

@ -0,0 +1,11 @@
DROP TABLE IF EXISTS
lsif_data_metadata,
lsif_data_documents,
lsif_data_documents_schema_versions,
lsif_data_result_chunks,
lsif_data_definitions,
lsif_data_definitions_schema_versions,
lsif_data_references,
lsif_data_references_schema_versions,
lsif_data_implementations,
lsif_data_implementations_schema_versions CASCADE;

View File

@ -369,191 +369,6 @@ COMMENT ON COLUMN codeintel_scip_symbols_schema_versions.min_schema_version IS '
COMMENT ON COLUMN codeintel_scip_symbols_schema_versions.max_schema_version IS 'An upper-bound on the `schema_version` values of the records in the table [`codeintel_scip_symbols`](#table-publiccodeintel_scip_symbols) where the `upload_id` column matches the associated SCIP index.';
CREATE TABLE lsif_data_definitions (
dump_id integer NOT NULL,
scheme text NOT NULL,
identifier text NOT NULL,
data bytea,
schema_version integer NOT NULL,
num_locations integer NOT NULL
);
COMMENT ON TABLE lsif_data_definitions IS 'Associates (document, range) pairs with the import monikers attached to the range.';
COMMENT ON COLUMN lsif_data_definitions.dump_id IS 'The identifier of the associated dump in the lsif_uploads table (state=completed).';
COMMENT ON COLUMN lsif_data_definitions.scheme IS 'The moniker scheme.';
COMMENT ON COLUMN lsif_data_definitions.identifier IS 'The moniker identifier.';
COMMENT ON COLUMN lsif_data_definitions.data IS 'A gob-encoded payload conforming to an array of [LocationData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L106:6) types.';
COMMENT ON COLUMN lsif_data_definitions.schema_version IS 'The schema version of this row - used to determine presence and encoding of data.';
COMMENT ON COLUMN lsif_data_definitions.num_locations IS 'The number of locations stored in the data field.';
CREATE TABLE lsif_data_definitions_schema_versions (
dump_id integer NOT NULL,
min_schema_version integer,
max_schema_version integer
);
COMMENT ON TABLE lsif_data_definitions_schema_versions IS 'Tracks the range of schema_versions for each upload in the lsif_data_definitions table.';
COMMENT ON COLUMN lsif_data_definitions_schema_versions.dump_id IS 'The identifier of the associated dump in the lsif_uploads table.';
COMMENT ON COLUMN lsif_data_definitions_schema_versions.min_schema_version IS 'A lower-bound on the `lsif_data_definitions.schema_version` where `lsif_data_definitions.dump_id = dump_id`.';
COMMENT ON COLUMN lsif_data_definitions_schema_versions.max_schema_version IS 'An upper-bound on the `lsif_data_definitions.schema_version` where `lsif_data_definitions.dump_id = dump_id`.';
CREATE TABLE lsif_data_documents (
dump_id integer NOT NULL,
path text NOT NULL,
data bytea,
schema_version integer NOT NULL,
num_diagnostics integer NOT NULL,
ranges bytea,
hovers bytea,
monikers bytea,
packages bytea,
diagnostics bytea
);
COMMENT ON TABLE lsif_data_documents IS 'Stores reference, hover text, moniker, and diagnostic data about a particular text document witin a dump.';
COMMENT ON COLUMN lsif_data_documents.dump_id IS 'The identifier of the associated dump in the lsif_uploads table (state=completed).';
COMMENT ON COLUMN lsif_data_documents.path IS 'The path of the text document relative to the associated dump root.';
COMMENT ON COLUMN lsif_data_documents.data IS 'A gob-encoded payload conforming to the [DocumentData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L13:6) type. This field is being migrated across ranges, hovers, monikers, packages, and diagnostics columns and will be removed in a future release of Sourcegraph.';
COMMENT ON COLUMN lsif_data_documents.schema_version IS 'The schema version of this row - used to determine presence and encoding of data.';
COMMENT ON COLUMN lsif_data_documents.num_diagnostics IS 'The number of diagnostics stored in the data field.';
COMMENT ON COLUMN lsif_data_documents.ranges IS 'A gob-encoded payload conforming to the [Ranges](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L14:2) field of the DocumentDatatype.';
COMMENT ON COLUMN lsif_data_documents.hovers IS 'A gob-encoded payload conforming to the [HoversResults](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L15:2) field of the DocumentDatatype.';
COMMENT ON COLUMN lsif_data_documents.monikers IS 'A gob-encoded payload conforming to the [Monikers](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L16:2) field of the DocumentDatatype.';
COMMENT ON COLUMN lsif_data_documents.packages IS 'A gob-encoded payload conforming to the [PackageInformation](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L17:2) field of the DocumentDatatype.';
COMMENT ON COLUMN lsif_data_documents.diagnostics IS 'A gob-encoded payload conforming to the [Diagnostics](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L18:2) field of the DocumentDatatype.';
CREATE TABLE lsif_data_documents_schema_versions (
dump_id integer NOT NULL,
min_schema_version integer,
max_schema_version integer
);
COMMENT ON TABLE lsif_data_documents_schema_versions IS 'Tracks the range of schema_versions for each upload in the lsif_data_documents table.';
COMMENT ON COLUMN lsif_data_documents_schema_versions.dump_id IS 'The identifier of the associated dump in the lsif_uploads table.';
COMMENT ON COLUMN lsif_data_documents_schema_versions.min_schema_version IS 'A lower-bound on the `lsif_data_documents.schema_version` where `lsif_data_documents.dump_id = dump_id`.';
COMMENT ON COLUMN lsif_data_documents_schema_versions.max_schema_version IS 'An upper-bound on the `lsif_data_documents.schema_version` where `lsif_data_documents.dump_id = dump_id`.';
CREATE TABLE lsif_data_implementations (
dump_id integer NOT NULL,
scheme text NOT NULL,
identifier text NOT NULL,
data bytea,
schema_version integer NOT NULL,
num_locations integer NOT NULL
);
COMMENT ON TABLE lsif_data_implementations IS 'Associates (document, range) pairs with the implementation monikers attached to the range.';
COMMENT ON COLUMN lsif_data_implementations.dump_id IS 'The identifier of the associated dump in the lsif_uploads table (state=completed).';
COMMENT ON COLUMN lsif_data_implementations.scheme IS 'The moniker scheme.';
COMMENT ON COLUMN lsif_data_implementations.identifier IS 'The moniker identifier.';
COMMENT ON COLUMN lsif_data_implementations.data IS 'A gob-encoded payload conforming to an array of [LocationData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L106:6) types.';
COMMENT ON COLUMN lsif_data_implementations.schema_version IS 'The schema version of this row - used to determine presence and encoding of data.';
COMMENT ON COLUMN lsif_data_implementations.num_locations IS 'The number of locations stored in the data field.';
CREATE TABLE lsif_data_implementations_schema_versions (
dump_id integer NOT NULL,
min_schema_version integer,
max_schema_version integer
);
COMMENT ON TABLE lsif_data_implementations_schema_versions IS 'Tracks the range of schema_versions for each upload in the lsif_data_implementations table.';
COMMENT ON COLUMN lsif_data_implementations_schema_versions.dump_id IS 'The identifier of the associated dump in the lsif_uploads table.';
COMMENT ON COLUMN lsif_data_implementations_schema_versions.min_schema_version IS 'A lower-bound on the `lsif_data_implementations.schema_version` where `lsif_data_implementations.dump_id = dump_id`.';
COMMENT ON COLUMN lsif_data_implementations_schema_versions.max_schema_version IS 'An upper-bound on the `lsif_data_implementations.schema_version` where `lsif_data_implementations.dump_id = dump_id`.';
CREATE TABLE lsif_data_metadata (
dump_id integer NOT NULL,
num_result_chunks integer
);
COMMENT ON TABLE lsif_data_metadata IS 'Stores the number of result chunks associated with a dump.';
COMMENT ON COLUMN lsif_data_metadata.dump_id IS 'The identifier of the associated dump in the lsif_uploads table (state=completed).';
COMMENT ON COLUMN lsif_data_metadata.num_result_chunks IS 'A bound of populated indexes in the lsif_data_result_chunks table for the associated dump. This value is used to hash identifiers into the result chunk index to which they belong.';
CREATE TABLE lsif_data_references (
dump_id integer NOT NULL,
scheme text NOT NULL,
identifier text NOT NULL,
data bytea,
schema_version integer NOT NULL,
num_locations integer NOT NULL
);
COMMENT ON TABLE lsif_data_references IS 'Associates (document, range) pairs with the export monikers attached to the range.';
COMMENT ON COLUMN lsif_data_references.dump_id IS 'The identifier of the associated dump in the lsif_uploads table (state=completed).';
COMMENT ON COLUMN lsif_data_references.scheme IS 'The moniker scheme.';
COMMENT ON COLUMN lsif_data_references.identifier IS 'The moniker identifier.';
COMMENT ON COLUMN lsif_data_references.data IS 'A gob-encoded payload conforming to an array of [LocationData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L106:6) types.';
COMMENT ON COLUMN lsif_data_references.schema_version IS 'The schema version of this row - used to determine presence and encoding of data.';
COMMENT ON COLUMN lsif_data_references.num_locations IS 'The number of locations stored in the data field.';
CREATE TABLE lsif_data_references_schema_versions (
dump_id integer NOT NULL,
min_schema_version integer,
max_schema_version integer
);
COMMENT ON TABLE lsif_data_references_schema_versions IS 'Tracks the range of schema_versions for each upload in the lsif_data_references table.';
COMMENT ON COLUMN lsif_data_references_schema_versions.dump_id IS 'The identifier of the associated dump in the lsif_uploads table.';
COMMENT ON COLUMN lsif_data_references_schema_versions.min_schema_version IS 'A lower-bound on the `lsif_data_references.schema_version` where `lsif_data_references.dump_id = dump_id`.';
COMMENT ON COLUMN lsif_data_references_schema_versions.max_schema_version IS 'An upper-bound on the `lsif_data_references.schema_version` where `lsif_data_references.dump_id = dump_id`.';
CREATE TABLE lsif_data_result_chunks (
dump_id integer NOT NULL,
idx integer NOT NULL,
data bytea
);
COMMENT ON TABLE lsif_data_result_chunks IS 'Associates result set identifiers with the (document path, range identifier) pairs that compose the set.';
COMMENT ON COLUMN lsif_data_result_chunks.dump_id IS 'The identifier of the associated dump in the lsif_uploads table (state=completed).';
COMMENT ON COLUMN lsif_data_result_chunks.idx IS 'The unique result chunk index within the associated dump. Every result set identifier present should hash to this index (modulo lsif_data_metadata.num_result_chunks).';
COMMENT ON COLUMN lsif_data_result_chunks.data IS 'A gob-encoded payload conforming to the [ResultChunkData](https://sourcegraph.com/github.com/sourcegraph/sourcegraph@3.26/-/blob/enterprise/lib/codeintel/semantic/types.go#L76:6) type.';
CREATE TABLE rockskip_ancestry (
id integer NOT NULL,
repo_id integer NOT NULL,
@ -657,36 +472,6 @@ ALTER TABLE ONLY codeintel_scip_symbols
ALTER TABLE ONLY codeintel_scip_symbols_schema_versions
ADD CONSTRAINT codeintel_scip_symbols_schema_versions_pkey PRIMARY KEY (upload_id);
ALTER TABLE ONLY lsif_data_definitions
ADD CONSTRAINT lsif_data_definitions_pkey PRIMARY KEY (dump_id, scheme, identifier);
ALTER TABLE ONLY lsif_data_definitions_schema_versions
ADD CONSTRAINT lsif_data_definitions_schema_versions_pkey PRIMARY KEY (dump_id);
ALTER TABLE ONLY lsif_data_documents
ADD CONSTRAINT lsif_data_documents_pkey PRIMARY KEY (dump_id, path);
ALTER TABLE ONLY lsif_data_documents_schema_versions
ADD CONSTRAINT lsif_data_documents_schema_versions_pkey PRIMARY KEY (dump_id);
ALTER TABLE ONLY lsif_data_implementations
ADD CONSTRAINT lsif_data_implementations_pkey PRIMARY KEY (dump_id, scheme, identifier);
ALTER TABLE ONLY lsif_data_implementations_schema_versions
ADD CONSTRAINT lsif_data_implementations_schema_versions_pkey PRIMARY KEY (dump_id);
ALTER TABLE ONLY lsif_data_metadata
ADD CONSTRAINT lsif_data_metadata_pkey PRIMARY KEY (dump_id);
ALTER TABLE ONLY lsif_data_references
ADD CONSTRAINT lsif_data_references_pkey PRIMARY KEY (dump_id, scheme, identifier);
ALTER TABLE ONLY lsif_data_references_schema_versions
ADD CONSTRAINT lsif_data_references_schema_versions_pkey PRIMARY KEY (dump_id);
ALTER TABLE ONLY lsif_data_result_chunks
ADD CONSTRAINT lsif_data_result_chunks_pkey PRIMARY KEY (dump_id, idx);
ALTER TABLE ONLY rockskip_ancestry
ADD CONSTRAINT rockskip_ancestry_pkey PRIMARY KEY (id);
@ -714,22 +499,6 @@ CREATE INDEX codeintel_scip_symbols_document_lookup_id ON codeintel_scip_symbols
CREATE INDEX codeisdntel_scip_symbol_names_upload_id_children ON codeintel_scip_symbol_names USING btree (upload_id, prefix_id) WHERE (prefix_id IS NOT NULL);
CREATE INDEX lsif_data_definitions_dump_id_schema_version ON lsif_data_definitions USING btree (dump_id, schema_version);
CREATE INDEX lsif_data_definitions_schema_versions_dump_id_schema_version_bo ON lsif_data_definitions_schema_versions USING btree (dump_id, min_schema_version, max_schema_version);
CREATE INDEX lsif_data_documents_dump_id_schema_version ON lsif_data_documents USING btree (dump_id, schema_version);
CREATE INDEX lsif_data_documents_schema_versions_dump_id_schema_version_boun ON lsif_data_documents_schema_versions USING btree (dump_id, min_schema_version, max_schema_version);
CREATE INDEX lsif_data_implementations_dump_id_schema_version ON lsif_data_implementations USING btree (dump_id, schema_version);
CREATE INDEX lsif_data_implementations_schema_versions_dump_id_schema_versio ON lsif_data_implementations_schema_versions USING btree (dump_id, min_schema_version, max_schema_version);
CREATE INDEX lsif_data_references_dump_id_schema_version ON lsif_data_references USING btree (dump_id, schema_version);
CREATE INDEX lsif_data_references_schema_versions_dump_id_schema_version_bou ON lsif_data_references_schema_versions USING btree (dump_id, min_schema_version, max_schema_version);
CREATE INDEX rockskip_ancestry_repo_commit_id ON rockskip_ancestry USING btree (repo_id, commit_id);
CREATE INDEX rockskip_repos_last_accessed_at ON rockskip_repos USING btree (last_accessed_at);
@ -746,14 +515,6 @@ CREATE TRIGGER codeintel_scip_documents_dereference_logs_insert AFTER DELETE ON
CREATE TRIGGER codeintel_scip_symbols_schema_versions_insert AFTER INSERT ON codeintel_scip_symbols REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_codeintel_scip_symbols_schema_versions_insert();
CREATE TRIGGER lsif_data_definitions_schema_versions_insert AFTER INSERT ON lsif_data_definitions REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_definitions_schema_versions_insert();
CREATE TRIGGER lsif_data_documents_schema_versions_insert AFTER INSERT ON lsif_data_documents REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_documents_schema_versions_insert();
CREATE TRIGGER lsif_data_implementations_schema_versions_insert AFTER INSERT ON lsif_data_implementations REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_implementations_schema_versions_insert();
CREATE TRIGGER lsif_data_references_schema_versions_insert AFTER INSERT ON lsif_data_references REFERENCING NEW TABLE AS newtab FOR EACH STATEMENT EXECUTE FUNCTION update_lsif_data_references_schema_versions_insert();
ALTER TABLE ONLY codeintel_scip_document_lookup
ADD CONSTRAINT codeintel_scip_document_lookup_document_id_fk FOREIGN KEY (document_id) REFERENCES codeintel_scip_documents(id);