25 lines
689 B
Swift
25 lines
689 B
Swift
import Foundation
|
|
|
|
/// Result of a migration operation with detailed information.
|
|
public struct MigrationResult: Sendable {
|
|
public let success: Bool
|
|
public let migratedCount: Int
|
|
public let errors: [MigrationError]
|
|
public let metadata: [String: AnyCodable]
|
|
public let duration: TimeInterval
|
|
|
|
public init(
|
|
success: Bool,
|
|
migratedCount: Int = 0,
|
|
errors: [MigrationError] = [],
|
|
metadata: [String: AnyCodable] = [:],
|
|
duration: TimeInterval = 0
|
|
) {
|
|
self.success = success
|
|
self.migratedCount = migratedCount
|
|
self.errors = errors
|
|
self.metadata = metadata
|
|
self.duration = duration
|
|
}
|
|
}
|