- Create MigrationTool console app for exporting DB config to K8s YAML - Support dry-run mode and validation - Add Npgsql and YamlDotNet dependencies
63 lines
1.4 KiB
C#
63 lines
1.4 KiB
C#
namespace MigrationTool;
|
|
|
|
/// <summary>
|
|
/// 迁移工具命令行选项
|
|
/// </summary>
|
|
public class MigrationOptions
|
|
{
|
|
/// <summary>
|
|
/// 数据库连接字符串
|
|
/// </summary>
|
|
public string ConnectionString { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// 输出目录
|
|
/// </summary>
|
|
public string OutputDir { get; set; } = "./output";
|
|
|
|
/// <summary>
|
|
/// 是否 Dry-Run 模式(只输出不写入文件)
|
|
/// </summary>
|
|
public bool DryRun { get; set; }
|
|
|
|
/// <summary>
|
|
/// 默认路由 Host
|
|
/// </summary>
|
|
public string DefaultHost { get; set; } = "api.fengling.com";
|
|
|
|
/// <summary>
|
|
/// 服务端口
|
|
/// </summary>
|
|
public int ServicePort { get; set; } = 80;
|
|
|
|
/// <summary>
|
|
/// 目标端口
|
|
/// </summary>
|
|
public int TargetPort { get; set; } = 8080;
|
|
|
|
/// <summary>
|
|
/// 是否验证数据完整性
|
|
/// </summary>
|
|
public bool Validate { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// 仅处理指定租户
|
|
/// </summary>
|
|
public string? TenantCode { get; set; }
|
|
|
|
/// <summary>
|
|
/// 日志级别
|
|
/// </summary>
|
|
public LogLevel LogLevel { get; set; } = LogLevel.Information;
|
|
|
|
/// <summary>
|
|
/// 是否生成报告文件
|
|
/// </summary>
|
|
public bool GenerateReport { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// 报告文件路径
|
|
/// </summary>
|
|
public string? ReportPath { get; set; }
|
|
}
|