mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
Part of CORE-99 This PR scaffolds the database schema and code structure based on [CORE-99 comment](https://linear.app/sourcegraph/issue/CORE-99/enterprise-portal-design-sams-user-to-subscription-rpcs#comment-8105ac31) with some modifications. See inline comments for more elaborations. - It uses GORM's ONLY for auto migration, just to kick things off, we may migrate to file-based migration like we are planning for SAMS. - It then uses the `*pgxpool.Pool` as the DB interface for executing business logic queries. Additionally, refactored `subscriptionsservice/v1.go` to use a `Store` that provide single interface for accessing data(base), as we have been doing in SAMS and SSC. ## Test plan Enterprise Portal starts locally, and database is initialized:  |
||
|---|---|---|
| .. | ||
| accesstoken | ||
| api | ||
| background | ||
| batches | ||
| cliutil | ||
| codeintel | ||
| enterpriseportal | ||
| errors | ||
| gitservice | ||
| iterator | ||
| managedservicesplatform | ||
| output | ||
| pointers | ||
| process | ||
| servicecatalog | ||
| telemetrygateway | ||
| buf.yaml | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
| tools.go | ||
Sourcegraph lib module
This directory is the root of a separate go module from the primary module rooted at sourcegraph/sourcegraph. This module exists to hold code that we want to reuse outside of the sourcegraph/sourcegraph repo.
Code in this module should not import from sourcegraph/sourcegraph or from other Sourcegraph repositories to avoid complicated dependency relationships. Instead consider moving code from elsewhere into this module.