AetherDb catalog resave [apply]: re-save every record under an older schema id through the current schema; dry run by default, idempotent

Closes follow_up aetherdb-catalog-resave for the restamp: a schema change no longer needs a hand restamp of Aetheria.cc.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
soul 2026-11-27 23:01:48 +01:00
commit e6e049a97e
3 changed files with 147 additions and 0 deletions

View file

@ -86,6 +86,13 @@ public static class Program
if (apply) db.Cache.FlushAsync().GetAwaiter().GetResult();
return code;
}
case "catalog":
{
if (args.Length < 2 || args[1] != "resave") { Console.WriteLine("catalog resave [apply]"); return 1; }
var apply = args.Contains("apply");
using var db = AetherDb.Open(catalogWritable: apply);
return CatalogResaveCommand.Run(db.Cache, apply, Console.Out);
}
case "economy": return EconomyCommand.Run(args.Skip(1).ToArray(), Console.Out);
case "auto-guns": return AutoGunsCatalog.Run(AetherDb.Open(catalogWritable: args.Contains("apply")).Cache, args.Contains("apply"), Console.Out);
case "doctrine-catalog": return DoctrineCatalog.Run(AetherDb.Open(catalogWritable: args.Contains("apply")).Cache, args.Contains("apply"), Console.Out);