Documentation
¶
Index ¶
- type Backend
- func (b *Backend) Close() error
- func (b *Backend) Connect(config *backends.ConnectionConfig) error
- func (b *Backend) CreateSchema(ctx context.Context, schemaName string) error
- func (b *Backend) ExecuteMigration(ctx context.Context, migration *backends.MigrationScript) error
- func (b *Backend) HealthCheck(ctx context.Context) error
- func (b *Backend) Name() string
- func (b *Backend) SchemaExists(ctx context.Context, schemaName string) (bool, error)
- func (b *Backend) TableExists(ctx context.Context, schemaName, tableName string) (bool, error)
- type DependencyValidator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements the Backend interface for PostgreSQL
func (*Backend) Connect ¶
func (b *Backend) Connect(config *backends.ConnectionConfig) error
Connect establishes a connection to PostgreSQL
func (*Backend) CreateSchema ¶
CreateSchema creates a schema if it doesn't exist
func (*Backend) ExecuteMigration ¶
ExecuteMigration executes a migration script
func (*Backend) HealthCheck ¶
HealthCheck verifies the backend is accessible
func (*Backend) SchemaExists ¶
SchemaExists checks if a schema exists
type DependencyValidator ¶
type DependencyValidator struct {
// contains filtered or unexported fields
}
DependencyValidator validates migration dependencies
func NewDependencyValidator ¶
func NewDependencyValidator(backend *Backend, tracker state.StateTracker, reg registry.Registry) *DependencyValidator
NewDependencyValidator creates a new dependency validator
func (*DependencyValidator) ValidateDependencies ¶
func (v *DependencyValidator) ValidateDependencies(ctx context.Context, migration *backends.MigrationScript, schemaName string) []error
ValidateDependencies validates all dependencies for a migration
func (*DependencyValidator) ValidateDependenciesWithExecutionSet ¶
func (v *DependencyValidator) ValidateDependenciesWithExecutionSet(ctx context.Context, migration *backends.MigrationScript, schemaName string, executionSet []*backends.MigrationScript) []error
ValidateDependenciesWithExecutionSet validates all dependencies for a migration, considering migrations in the execution set as satisfied dependencies
Click to show internal directories.
Click to hide internal directories.