You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add automated upgrade assistant for appsettings.json migrations (#463)
* Add Upgrade Assistant tool for appsettings.json migration
- Created LinkDotNet.Blog.UpgradeAssistant console tool in tools folder
- Implemented migration framework with version tracking
- Added migrations for 8.0→9.0, 9.0→11.0, and 11.0→12.0
- Colorful console output using ANSI colors
- Automatic backup functionality with timestamps
- Dry-run mode to preview changes
- Comprehensive documentation in docs/Migrations/UpgradeAssistant.md
- Updated MIGRATION.md to reference the new tool
- Added ConfigVersion field to appsettings.json
- Added backups/ to .gitignore
Co-authored-by: linkdotnet <[email protected]>
* Add unit tests for Upgrade Assistant
- Created test project LinkDotNet.Blog.UpgradeAssistant.Tests
- Added comprehensive tests for Migration8To9, Migration9To11, Migration11To12
- Added tests for MigrationManager including end-to-end scenarios
- All 17 tests passing
Co-authored-by: linkdotnet <[email protected]>
* Address code review feedback
- Remove OutputType from test project csproj
- Fix document disposal pattern in MigrationManager
- Use separate variable for each migration document
Co-authored-by: linkdotnet <[email protected]>
* Address PR feedback - use Spectre.Console, remove old migrations, skip appsettings.json
- Replace CommandLineParser with Spectre.Console for CLI and colorful output
- Remove Migration_8_To_9 and Migration_9_To_11 (current version is 11.0)
- Make CurrentVersion dynamic based on highest ToVersion from migrations
- Skip version-controlled appsettings.json file during migration
- Update tests to reflect changes (9 tests passing)
- Enhanced help and version output with Figlet text and tables
Co-authored-by: linkdotnet <[email protected]>
* Add projects to solution and remove unnecessary comments
- Added LinkDotNet.Blog.UpgradeAssistant and LinkDotNet.Blog.UpgradeAssistant.Tests to LinkDotNet.Blog.sln
- Removed inline comments from code, using descriptive method names instead
- Extracted ParseCommandLineArguments method for better code organization
- Created DetermineCurrentVersionFromMigrations and IsVersionControlledAppsettingsFile methods
- Kept only XML documentation comments (///) which are standard
- All tests passing (9/9)
Co-authored-by: linkdotnet <[email protected]>
* Add Automated Migration documentation to README files
- Added chapter about Automated Configuration Migration (Version 12+) in docs/Migrations/Readme.md
- Documented Upgrade Assistant features, usage examples, and benefits
- Added "Automated Configuration Migration" as a feature in main Readme.md
- Provided clear migration path: automated for v12+, manual for pre-v12
Co-authored-by: linkdotnet <[email protected]>
* docs: Add clarification and cleanup
* docs: Add readme
* fix: Build errors
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: linkdotnet <[email protected]>
Co-authored-by: Steven Giesel <[email protected]>
Copy file name to clipboardExpand all lines: MIGRATION.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,32 @@
1
1
# Migration Guide
2
2
This document describes the changes that need to be made to migrate from one version of the blog to another.
3
3
4
+
## Automated Upgrade Assistant
5
+
6
+
Starting with version 12.0, we provide an **Upgrade Assistant** tool that automates most configuration migrations. This tool:
7
+
- Automatically detects your current configuration version
8
+
- Applies necessary transformations to `appsettings.json` files
9
+
- Creates backups before making changes
10
+
- Provides colorful console output with clear warnings and instructions
11
+
12
+
**Usage:**
13
+
```bash
14
+
# From your blog directory
15
+
dotnet run --project tools/LinkDotNet.Blog.UpgradeAssistant
16
+
17
+
# Preview changes without applying
18
+
dotnet run --project tools/LinkDotNet.Blog.UpgradeAssistant -- --dry-run
19
+
20
+
# See all options
21
+
dotnet run --project tools/LinkDotNet.Blog.UpgradeAssistant -- --help
22
+
```
23
+
24
+
For detailed documentation, see [docs/Migrations/UpgradeAssistant.md](docs/Migrations/UpgradeAssistant.md).
25
+
26
+
**Note:** While the Upgrade Assistant handles most configuration changes automatically, some migrations still require manual steps (especially database schema changes). These are noted below.
27
+
28
+
---
29
+
4
30
## 11.0 to 12.0
5
31
`ShowBuildInformation` setting was added on the root level of the `appsettings.json` file. This setting controls whether build information (like build date) is shown in the `Footer` component.
Copy file name to clipboardExpand all lines: docs/Migrations/Readme.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,4 +6,33 @@ This is contrasted by Minor changes. These are things where the user does not ne
6
6
7
7
Breaking changes are recorded in the [MIGRATION.md](../../MIGRATION.md). Since version 9 of the blog, “Entity Framework Migrations” has been introduced for all SQL providers. You can read more in the [documentation](../Storage/Readme.md). In a nutshell, this means that database migration can be carried out easily via the “ef migration” CLI tool. More on this in the documentation linked above.
8
8
9
-
Changes for the appsettings.json must currently still be made manually. The exact changes that need to be made here can be found in MIGRATION.md.
9
+
Changes for the appsettings.json must currently still be made manually. The exact changes that need to be made here can be found in MIGRATION.md.
Starting with **version 12**, the blog includes an **Automated Upgrade Assistant** that handles appsettings.json migrations automatically. This tool eliminates the need for manual configuration changes in most cases.
14
+
15
+
### What the Upgrade Assistant Does
16
+
17
+
-**Automatic Detection** - Detects your current configuration version
0 commit comments