using System.CommandLine; using MicroForge.CLI.Commands.Interfaces; namespace MicroForge.CLI.Commands; public partial class MicroForge { public partial class Migrations { public class Rollback : Command, ISubCommandOf { public Rollback() : base("rollback", "Rollback the last migration") { AddAlias("r"); this.SetHandler(ExecuteAsync); } private async Task ExecuteAsync() { await Bash.ExecuteAsync([ "source .venv/bin/activate", "alembic downgrade -1" ]); } } } }