namespace Migrato.Core;
///
/// Migration represents a SQL migration
///
///
/// Creates a new instance of Migration
///
///
public class Migration(long version)
{
///
/// Gets the version of the migration
///
public long Version { get; init; } = version;
///
/// Gets the file path of the migration
///
public string? Source { get; init; }
///
/// Gets the name of the migration, derived from its file name
///
public string Name { get; init; } = string.Empty;
///
/// Gets the SQL that should run when applying this migration
///
public string UpSql { get; init; } = string.Empty;
///
/// Gets the SQL that should run when reverting this migration
///
public string DownSql { get; init; } = string.Empty;
///
/// Returns the migration's path
///
public override string ToString() => Source ?? "";
}