Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: rename api to base (#15775)
p0nyde3d46451cf2
diff --git a/backend/store/environment.go b/backend/store/environment.goindex b2781080a2..848c0e56c6 100644--- a/backend/store/environment.go+++ b/backend/store/environment.go@@ -9,7 +9,7 @@ import ("github.com/pkg/errors""google.golang.org/protobuf/encoding/protojson"- api "github.com/bytebase/bytebase/backend/base"+ "github.com/bytebase/bytebase/backend/base""github.com/bytebase/bytebase/backend/common"storepb "github.com/bytebase/bytebase/proto/generated-go/store")@@ -132,9 +132,9 @@ func (s *Store) CreateEnvironmentV2(ctx context.Context, create *EnvironmentMessreturn nil, err}if _, err := upsertPolicyV2Impl(ctx, tx, &PolicyMessage{- ResourceType: api.PolicyResourceTypeEnvironment,+ ResourceType: base.PolicyResourceTypeEnvironment,Resource: common.FormatEnvironment(create.ResourceID),- Type: api.PolicyTypeEnvironmentTier,+ Type: base.PolicyTypeEnvironmentTier,InheritFromParent: true,Payload: string(payload),Enforce: true,@@ -195,9 +195,9 @@ func (s *Store) UpdateEnvironmentV2(ctx context.Context, patch *UpdateEnvironmen// TODO(d): consider moving tier to environment table to simplify things.if patch.Protected != nil || patch.Color != nil {- resourceType := api.PolicyResourceTypeEnvironment+ resourceType := base.PolicyResourceTypeEnvironmentresource := common.FormatEnvironment(patch.ResourceID)- policyType := api.PolicyTypeEnvironmentTier+ policyType := base.PolicyTypeEnvironmentTierpolicy, err := s.GetPolicyV2(ctx, &FindPolicyMessage{ResourceType: &resourceType,Type: &policyType,