|
- namespace Campaign_Tracker.Server.LegacyData.Schema;
-
- /// <summary>
- /// Categorisation of a structural delta detected by the compatibility check
- /// (Story 1.7 AC #2). Used in <see cref="LegacySchemaDrift"/> entries.
- /// </summary>
- public enum LegacySchemaChangeType
- {
- TableMissing,
- TableAdded,
- ColumnMissing,
- ColumnAdded,
- ColumnTypeChanged,
- ColumnSizeChanged,
- ColumnNullabilityChanged,
- ColumnConstraintsChanged,
- }
-
- /// <summary>
- /// One structural delta entry between baseline and live schema.
- /// <see cref="ColumnName"/> is null for table-level drift entries.
- /// </summary>
- public sealed record LegacySchemaDrift(
- string TableName,
- string? ColumnName,
- LegacySchemaChangeType ChangeType,
- string Detail);
-
- /// <summary>
- /// Outcome of a compatibility check run.
- /// AC #2: failure includes structured drift list identifying table, column, and change type.
- /// AC #3: pass returns timestamp, count of tables verified, and zero drift count.
- /// </summary>
- public sealed record LegacySchemaCheckResult(
- bool Passed,
- int TablesVerified,
- int DriftCount,
- DateTimeOffset CheckedAt,
- IReadOnlyList<LegacySchemaDrift> Drifts,
- string BaselineSource);
|