- Implement functionality to create, update, delete, and view relationships between tables. - Introduce new UI screens for managing relationships, including forms for adding and editing relationships. - Enhance table editor with navigation to relationship management. - Ensure relationships are displayed in a structured table format for better usability.
44 lines
1.5 KiB
Go
44 lines
1.5 KiB
Go
// Package diff provides utilities for comparing database schemas and identifying differences.
|
|
//
|
|
// # Overview
|
|
//
|
|
// The diff package compares two database models at various granularity levels (database,
|
|
// schema, table, column) and produces detailed reports of differences including:
|
|
// - Missing items (present in source but not in target)
|
|
// - Extra items (present in target but not in source)
|
|
// - Modified items (present in both but with different properties)
|
|
//
|
|
// # Usage
|
|
//
|
|
// Compare two databases and format the output:
|
|
//
|
|
// result := diff.CompareDatabases(sourceDB, targetDB)
|
|
// err := diff.FormatDiff(result, diff.OutputFormatText, os.Stdout)
|
|
//
|
|
// # Output Formats
|
|
//
|
|
// The package supports multiple output formats:
|
|
// - OutputFormatText: Human-readable text format
|
|
// - OutputFormatJSON: Structured JSON output
|
|
// - OutputFormatYAML: Structured YAML output
|
|
//
|
|
// # Comparison Scope
|
|
//
|
|
// The comparison covers:
|
|
// - Schemas: Name, description, and contents
|
|
// - Tables: Name, description, and all sub-elements
|
|
// - Columns: Type, nullability, defaults, constraints
|
|
// - Indexes: Columns, uniqueness, type
|
|
// - Constraints: Type, columns, references
|
|
// - Relationships: Type, from/to tables and columns
|
|
// - Views: Definition and columns
|
|
// - Sequences: Start value, increment, min/max values
|
|
//
|
|
// # Use Cases
|
|
//
|
|
// - Schema migration planning
|
|
// - Database synchronization verification
|
|
// - Change tracking and auditing
|
|
// - CI/CD pipeline validation
|
|
package diff
|