Fix documentation for custom version table implementation and metadat…#2218
Conversation
…a interface - Fixes #2217
There was a problem hiding this comment.
Pull request overview
This PR fixes documentation for implementing custom version table metadata in FluentMigrator. It addresses issue #2217 by providing comprehensive examples and explanations for customizing the VersionInfo table.
Key Changes:
- Adds a detailed table documenting all
IVersionTableMetaDatainterface properties with their default values and descriptions - Provides two implementation approaches: direct
IVersionTableMetaDataimplementation and inheritance fromDefaultVersionTableMetaData - Updates code examples to show proper registration patterns for both approaches
| | SchemaName | (empty) | The schema where the version table is stored | | ||
| | TableName | `"VersionInfo"` | The table where the version information is stored | | ||
| | ColumnName | `"Version"` | The name of the column where the version numbers are stored | | ||
| | DescriptionColumnName | `"Description"` | The name of the last migration applied | |
There was a problem hiding this comment.
The description for the DescriptionColumnName property is incorrect. It states "The name of the last migration applied" but according to the interface documentation and code, this column stores the description/name of each migration, not just the last one. The description should be something like "The name of the column where migration descriptions are stored".
| | DescriptionColumnName | `"Description"` | The name of the last migration applied | | |
| | DescriptionColumnName | `"Description"` | The name of the column where migration descriptions are stored | |
| ```csharp | ||
| public class CustomVersionTable : DefaultVersionTableMetaData | ||
| [VersionTableMetaData] | ||
| public class CustomVersionTable : IVersionTableMetaData | ||
| { | ||
| public override string TableName => "MigrationHistory"; | ||
| public override string SchemaName => "dbo"; | ||
| public override string ColumnName => "Version"; | ||
| public override string DescriptionColumnName => "Description"; | ||
| public override string AppliedOnColumnName => "AppliedDate"; | ||
| public bool OwnsSchema => true; | ||
| public string SchemaName => null; | ||
| public string TableName => "CustomVersionInfo"; | ||
| public string ColumnName => "Version"; | ||
| public string DescriptionColumnName => "Description"; | ||
| public string UniqueIndexName => "UC_Version"; | ||
| public string AppliedOnColumnName => "AppliedOn"; | ||
| public bool CreateWithPrimaryKey => false; | ||
| } | ||
|
|
||
| // Use custom version table | ||
| .WithVersionTable(new CustomVersionTable()) | ||
| // ... and use it in the runner configuration: | ||
| services => services | ||
| .ConfigureRunner(rb => rb.WithVersionTable(new CustomVersionTable())) | ||
| ``` |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There was a problem hiding this comment.
@PhenX Did you mark this as off-topic? Trying to figure out based on your comments where the bug is in the PR review subsystem.
|
@jzabroski I've opened a new pull request, #2219, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@jzabroski the original pr already has this change at the end. Did you think of something else? |
|
Weird, that's looks like a display bug because it's there |
|
Yikes. How do we report this to GitHub? |
|
@jzabroski https://support.github.com/contact/bug-report on my side I don't have this problem whether I'm on the old or the new layout |
|
@jzabroski Is there still a problem on your side ? |


…a interface - Fixes #2217