Documentation
¶
Overview ¶
Package merge provides utilities for merging database schemas. It allows combining schemas from multiple sources while avoiding duplicates, supporting only additive operations (no deletion or modification of existing items).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMergeSummary ¶
func GetMergeSummary(result *MergeResult) string
GetMergeSummary returns a human-readable summary of the merge result
Types ¶
type MergeOptions ¶
type MergeOptions struct {
SkipDomains bool
SkipRelations bool
SkipEnums bool
SkipViews bool
SkipSequences bool
SkipTableNames map[string]bool // Tables to skip during merge (keyed by table name)
}
MergeOptions contains options for merge operations
type MergeResult ¶
type MergeResult struct {
SchemasAdded int
TablesAdded int
ColumnsAdded int
RelationsAdded int
DomainsAdded int
EnumsAdded int
ViewsAdded int
SequencesAdded int
}
MergeResult represents the result of a merge operation
func MergeDatabases ¶
func MergeDatabases(target, source *models.Database, opts *MergeOptions) *MergeResult
MergeDatabases merges the source database into the target database. Only adds missing items; existing items are not modified.
Click to show internal directories.
Click to hide internal directories.