## Summary
All data folders are now migrated to JSON in the `{mandator}/{year}` layout, so the one-time migration from #2 is no longer needed.
- Remove `DataMigrator` and its 15 tests, its DI registration and the startup call in `Program.cs` (`Main` is back to a plain `app.Run()`).
- Remove the old-layout year-folder filter in `SettingsService.GetMandators` and the `DataFolders.IsYear` helper it used.
- Remove the migration notes from `CLAUDE.md` and code comments.
- Rename `.xml` paths to `.json` in a repository-cache test (cosmetic).
Bank-statement import (CAMT053 `.xml` in `StatementImport`) is unaffected.
**Note:** this version expects every data folder to be migrated already. An old-layout or XML data folder is no longer converted. The original XMLs remain in `backup/{mandator}/{year}/xml-<timestamp>/` and can be deleted manually.
## Test plan
- [x] `dotnet build --no-incremental`: no warnings
- [x] `dotnet test`: 62/62 pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Reviewed-on: #3
Co-authored-by: Claudio Schaad <c.schaad@pog.ch>
Co-committed-by: Claudio Schaad <c.schaad@pog.ch>
24 lines
903 B
C#
24 lines
903 B
C#
namespace Schaad.Accounting
|
|
{
|
|
/// <summary>
|
|
/// Folder layout below DataPath:
|
|
/// <code>
|
|
/// {DataPath}/{mandator}/{year}/*.json data files
|
|
/// {DataPath}/uploads/{mandator}/{year}/ imported bank statements (+ creditCard/)
|
|
/// {DataPath}/backup/{mandator}/{year}/ backup zips
|
|
/// </code>
|
|
/// </summary>
|
|
public static class DataFolders
|
|
{
|
|
public const string Uploads = "uploads";
|
|
public const string Backup = "backup";
|
|
public const string CreditCard = "creditCard";
|
|
|
|
/// <summary>
|
|
/// True for the top-level folders that are not mandators.
|
|
/// </summary>
|
|
public static bool IsReserved(string folderName)
|
|
=> folderName.Equals(Uploads, System.StringComparison.OrdinalIgnoreCase)
|
|
|| folderName.Equals(Backup, System.StringComparison.OrdinalIgnoreCase);
|
|
}
|
|
}
|