Files
threshold/internal/db/schema/migrations/oss/oss.go
T
429247f407 [COMPLIANCE] Update Copyright Headers (#6282)
* [COMPLIANCE] Update Copyright and License Headers

* chore: make gen to generate files with copyright headers

* chore: update missed copyright headers

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Justin Nguyen <justin.nguyen@hashicorp.com>
2026-01-28 11:05:07 -06:00

39 lines
1.2 KiB
Go

// Copyright IBM Corp. 2020, 2025
// SPDX-License-Identifier: BUSL-1.1
// Package oss is used to embed the sql statements for the oss edition and
// registering the edition for the schema.Manager.
package oss
import (
"embed"
"github.com/hashicorp/boundary/internal/db/schema"
"github.com/hashicorp/boundary/internal/db/schema/internal/edition"
"github.com/hashicorp/boundary/internal/db/schema/migration"
"github.com/hashicorp/boundary/internal/db/schema/migrations/oss/internal/hook46001"
"github.com/hashicorp/boundary/internal/db/schema/migrations/oss/internal/hook97001"
)
// postgres contains the migrations sql files for postgres oss edition
//
//go:embed postgres
var postgres embed.FS
var prehooks = map[int]*migration.Hook{
46001: {
CheckFunc: hook46001.FindIllegalAssociations,
RepairFunc: hook46001.RepairIllegalAssociations,
RepairDescription: hook46001.RepairDescription,
},
97001: {
CheckFunc: hook97001.FindInvalidAssociations,
RepairFunc: hook97001.RepairInvalidAssociations,
RepairDescription: hook97001.RepairDescription,
},
}
func init() {
schema.RegisterEdition("oss", schema.Postgres, postgres, 0, edition.WithPreHooks(prehooks))
}