Skip to content

Fix documentation for custom version table implementation and metadat…#2218

Merged
jzabroski merged 2 commits into
mainfrom
fix-custom-table-version-docs
Jan 15, 2026
Merged

Fix documentation for custom version table implementation and metadat…#2218
jzabroski merged 2 commits into
mainfrom
fix-custom-table-version-docs

Conversation

@PhenX

@PhenX PhenX commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

…a interface - Fixes #2217

@PhenX
PhenX requested a review from jzabroski as a code owner January 7, 2026 20:12
@PhenX
PhenX requested review from Copilot and removed request for jzabroski January 7, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 IVersionTableMetaData interface properties with their default values and descriptions
  • Provides two implementation approaches: direct IVersionTableMetaData implementation and inheritance from DefaultVersionTableMetaData
  • Updates code examples to show proper registration patterns for both approaches

Comment thread docs-website/intro/configuration.md Outdated
| 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 |

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Suggested change
| DescriptionColumnName | `"Description"` | The name of the last migration applied |
| DescriptionColumnName | `"Description"` | The name of the column where migration descriptions are stored |

Copilot uses AI. Check for mistakes.
Comment on lines 155 to 172
```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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I did

@github-actions

github-actions Bot commented Jan 7, 2026

Copy link
Copy Markdown

Test Results

    2 files  ±0      2 suites  ±0   39s ⏱️ +3s
5 396 tests ±0  5 064 ✅ ±0  332 💤 ±0  0 ❌ ±0 
5 877 runs  ±0  5 281 ✅ ±0  596 💤 ±0  0 ❌ ±0 

Results for commit f85b6e7. ± Comparison against base commit d73e81e.

♻️ This comment has been updated with latest results.

@fluentmigrator fluentmigrator deleted a comment from Copilot AI Jan 7, 2026
@PhenX
PhenX requested a review from jzabroski January 8, 2026 18:05
@jzabroski

Copy link
Copy Markdown
Collaborator

While this works, I think @copilot should provide a second example that does inherit from DefaultVersionTableMetaData and calls the base class constructor, as originally called out in #2217

Copilot AI commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

@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

Copy link
Copy Markdown
Collaborator

@PhenX It looks like #2219 supercedes this PR, as it basically includes this PR.

@PhenX

PhenX commented Jan 8, 2026

Copy link
Copy Markdown
Collaborator Author

@jzabroski the original pr already has this change at the end. Did you think of something else?

@jzabroski

Copy link
Copy Markdown
Collaborator

I don't see it in the PR? I see

image

@PhenX

PhenX commented Jan 8, 2026

Copy link
Copy Markdown
Collaborator Author

Weird, that's looks like a display bug because it's there

@PhenX

PhenX commented Jan 8, 2026

Copy link
Copy Markdown
Collaborator Author

@jzabroski
image

@jzabroski

Copy link
Copy Markdown
Collaborator

Yikes. How do we report this to GitHub?

@PhenX

PhenX commented Jan 9, 2026

Copy link
Copy Markdown
Collaborator Author

@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

@PhenX

PhenX commented Jan 15, 2026

Copy link
Copy Markdown
Collaborator Author

@jzabroski Is there still a problem on your side ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong documentation about custom VersionTable

4 participants