Files
go-migrate-db/internal/app/models/main.go
Kylesoda 5ee132a1ce feat: add validation feature for row count comparison
Add a validate command that compares row counts between source and target tables after a migration.
2026-05-12 17:00:00 -05:00

47 lines
717 B
Go

package models
import (
"time"
"github.com/google/uuid"
)
type UnknownRowValues = []any
type BatchRef struct {
Id uuid.UUID
PartitionId uuid.UUID
}
type Batch struct {
Id uuid.UUID
ParentBatches []BatchRef
Rows []UnknownRowValues
RetryCounter int
}
type PartitionRange struct {
Min int64
Max int64
IsMinInclusive bool
IsMaxInclusive bool
}
type Partition struct {
Id uuid.UUID
ParentId uuid.UUID
Range PartitionRange
HasRange bool
RetryCounter int
}
type JobResult struct {
JobName string
StartTime time.Time
Duration time.Duration
RowsRead int64
RowsLoaded int64
RowsFailed int64
Error error
}