SchemaDiffKind
Describes a difference between entity schema and database schema.
フィールド
public const SchemaDiffKind ColumnNameCaseMismatch
value = SchemaDiffKind.ColumnNameCaseMismatch
A column exists under the expected name but in different letter case than the entity declares. Opt-in and informational only, like TableNameCaseMismatch.
public const SchemaDiffKind CompressionMismatch
value = SchemaDiffKind.CompressionMismatch
The table is packed on disk differently from what the entity declares with [DataCompression]. Repacking loses nothing, but it rewrites every index of the table, so it is emitted as a statement to run rather than applied quietly.
public const SchemaDiffKind ExtraColumn
value = SchemaDiffKind.ExtraColumn
Column exists in database but not in entity.
public const SchemaDiffKind ExtraForeignKey
value = SchemaDiffKind.ExtraForeignKey
Database has a foreign-key constraint that no entity column declares. Informational only — never auto-dropped (mirrors ExtraColumn).
public const SchemaDiffKind ExtraIndex
value = SchemaDiffKind.ExtraIndex
Database has an index that no entity column declares. Informational only — never auto-dropped (mirrors ExtraColumn and ExtraForeignKey). Primary-key and unique-constraint backing indexes are filtered out before reaching this diff so they don't surface as false positives.
public const SchemaDiffKind ExtraTable
value = SchemaDiffKind.ExtraTable
Table exists in the database but no entity maps to it. Surfaced only when the caller opts in (detectExtraTables on DbTableCompressionInfo})), because a partial entity set would otherwise flag every unrelated table. Never auto-dropped — emitted as a commented-out DROP TABLE (mirrors ExtraColumn).
public const SchemaDiffKind ForeignKeyNameMismatch
value = SchemaDiffKind.ForeignKeyNameMismatch
A foreign-key constraint in the database is not named per String). Opt-in and informational only, like PrimaryKeyNameMismatch.
public const SchemaDiffKind IndexNameMismatch
value = SchemaDiffKind.IndexNameMismatch
An index in the database is not named per Boolean). Indexes the model names explicitly (a composite Name) are exempt — the author chose that name deliberately. Opt-in and informational only, like PrimaryKeyNameMismatch.
public const SchemaDiffKind MaxLengthMismatch
value = SchemaDiffKind.MaxLengthMismatch
Column max length differs between entity and database.
public const SchemaDiffKind MissingColumn
value = SchemaDiffKind.MissingColumn
Column exists in entity but not in database.
public const SchemaDiffKind MissingForeignKey
value = SchemaDiffKind.MissingForeignKey
Entity declares a [RelationSingle] column but the live database has no matching foreign-key constraint. Backfilled via ALTER TABLE … ADD CONSTRAINT.
public const SchemaDiffKind MissingIndex
value = SchemaDiffKind.MissingIndex
Entity declares a [Index] (or [Unique]) column but the live database has no matching single-column index. Backfilled via CREATE INDEX by Schema}).
public const SchemaDiffKind MissingTable
value = SchemaDiffKind.MissingTable
Table exists in entity schema but not in database.
public const SchemaDiffKind NullabilityMismatch
value = SchemaDiffKind.NullabilityMismatch
Column nullability differs between entity and database.
public const SchemaDiffKind PrecisionMismatch
value = SchemaDiffKind.PrecisionMismatch
Column precision or scale differs between entity and database.
public const SchemaDiffKind PrimaryKeyNameMismatch
value = SchemaDiffKind.PrimaryKeyNameMismatch
A primary-key constraint in the database is not named per String). Surfaced only when the caller opts in (checkNaming on DbTableCompressionInfo})). Informational only — renaming a constraint is a destructive operation, so it is never applied automatically (mirrors ExtraColumn).
public const SchemaDiffKind TableNameCaseMismatch
value = SchemaDiffKind.TableNameCaseMismatch
A table exists under the expected name but in different letter case than the entity declares. Tables are reconciled case-insensitively, so the drift is otherwise invisible — yet it breaks case-sensitive collations and quoted SQL. Opt-in and informational only, like PrimaryKeyNameMismatch.
public const SchemaDiffKind TypeMismatch
value = SchemaDiffKind.TypeMismatch
Column SQL type differs between entity and database.