Feat v0.8.3 vector column (#70)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / test-frontend (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-sqlite (push) Successful in 2m59s
CI/CD / test-go-pg (push) Successful in 2m58s
CI/CD / build-and-deploy (push) Successful in 1m14s
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / test-frontend (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-sqlite (push) Successful in 2m59s
CI/CD / test-go-pg (push) Successful in 2m58s
CI/CD / build-and-deploy (push) Successful in 1m14s
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #70.
This commit is contained in:
@@ -17,13 +17,19 @@ import (
|
||||
|
||||
// ExtensionHandler serves extension management endpoints.
|
||||
type ExtensionHandler struct {
|
||||
stores store.Stores
|
||||
stores store.Stores
|
||||
capabilities map[string]bool
|
||||
}
|
||||
|
||||
func NewExtensionHandler(stores store.Stores) *ExtensionHandler {
|
||||
return &ExtensionHandler{stores: stores}
|
||||
}
|
||||
|
||||
// SetCapabilities stores the detected environment capabilities map.
|
||||
func (h *ExtensionHandler) SetCapabilities(caps map[string]bool) {
|
||||
h.capabilities = caps
|
||||
}
|
||||
|
||||
// validTiers is the set of accepted extension tier values.
|
||||
var validTiers = map[string]bool{
|
||||
models.ExtTierBrowser: true,
|
||||
@@ -231,7 +237,7 @@ func (h *ExtensionHandler) AdminInstallExtension(c *gin.Context) {
|
||||
SyncManifestPermissions(c, h.stores, pkg.ID, manifestMap)
|
||||
|
||||
if tables, ok := ParseDBTables(manifestMap); ok {
|
||||
if err := CreateExtTables(c.Request.Context(), database.DB, database.IsPostgres(), h.stores, pkg.ID, tables); err != nil {
|
||||
if err := CreateExtTables(c.Request.Context(), database.DB, database.IsPostgres(), h.stores, pkg.ID, tables, h.capabilities["pgvector"]); err != nil {
|
||||
log.Printf("[ext-db] schema create failed for %s: %v", pkg.ID, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user