/// <summary> /// Flyway runner settings /// </summary> /// <param name="command"></param> /// <param name="configuration"></param> internal FlywaySettingsBase(string command, FlywayConfiguration configuration) { if (string.IsNullOrWhiteSpace(command)) { throw new ArgumentNullException(nameof(command)); } Command = command; Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); }
/// <summary> /// Flyway validate settings /// </summary> /// <param name="configuration"></param> public FlywayValidateSettings(FlywayConfiguration configuration) : base("validate", configuration) { }
/// <summary> /// Flyway settings ctor for derived classes /// </summary> /// <param name="command"></param> /// <param name="configuration"></param> protected FlywayValidateSettings(string command, FlywayConfiguration configuration) : base(command, configuration) { }
/// <summary> /// Flyway repair settings /// </summary> /// <param name="configuration"></param> public FlywayRepairSettings(FlywayConfiguration configuration) : base("repair", configuration) { }
/// <summary> /// Flyway settings ctor for derived classes /// </summary> /// <param name="command"></param> /// <param name="configuration"></param> protected FlywayRepairSettings(string command, FlywayConfiguration configuration) : base(command, configuration) { }
/// <summary> /// Flyway clean settings /// </summary> /// <param name="configuration"></param> public FlywayCleanSettings(FlywayConfiguration configuration) : base("clean", configuration) { }
/// <summary> /// Flyway info settings /// </summary> /// <param name="configuration"></param> public FlywayInfoSettings(FlywayConfiguration configuration) : base("info", configuration) { }
/// <summary> /// Flyway migrate settings /// </summary> /// <param name="configuration"></param> public FlywayMigrateSettings(FlywayConfiguration configuration) : base("migrate", configuration) { }
/// <summary> /// Flyway baseline settings /// </summary> /// <param name="configuration"></param> public FlywayBaselineSettings(FlywayConfiguration configuration) : base("baseline", configuration) { }
/// <summary> /// Execute 'flyway clean' with options /// </summary> /// <param name="configuration"></param> /// <example> /// <para>Run 'flyway clean'</para> /// <code> /// <![CDATA[ /// Task("Flyway-Clean) /// .Does(() => /// { /// Flyway.Clean(); /// }); /// ]]> /// </code> /// </example> public IFlywayRunnerCommands Clean(FlywayConfiguration configuration = null) { var settings = new FlywayCleanSettings(configuration); return(Run(settings)); }
/// <summary> /// Execute 'flyway baseline' with options /// </summary> /// <param name="configuration"></param> /// <example> /// <para>Run 'flyway baseline'</para> /// <code> /// <![CDATA[ /// Task("Flyway-Info) /// .Does(() => /// { /// Flyway.Migrate(); /// }); /// ]]> /// </code> /// <para>Run 'flyway baseline'</para> /// <code> /// <![CDATA[ /// Task("Flyway-Info) /// .Does(() => /// { /// Flyway.Migrate(new FlywayConfiguration /// { /// BaselineVersion = "1.0.0.0" /// } /// ); /// }); /// ]]> /// </code> /// </example> public IFlywayRunnerCommands Baseline(FlywayConfiguration configuration = null) { var settings = new FlywayBaselineSettings(configuration); return(Run(settings)); }
/// <summary> /// Execute 'flyway validate' with options /// </summary> /// <param name="configuration"></param> /// <example> /// <para>Run 'flyway validate'</para> /// <code> /// <![CDATA[ /// Task("Flyway-Validate) /// .Does(() => /// { /// Flyway.Validate(); /// }); /// ]]> /// </code> /// <para>Run 'flyway validate'</para> /// <code> /// <![CDATA[ /// Task("Flyway-Validate) /// .Does(() => /// { /// Flyway.Validate(new FlywayConfiguration /// { /// OutOfOrder = true /// } /// ); /// }); /// ]]> /// </code> /// </example> public IFlywayRunnerCommands Validate(FlywayConfiguration configuration = null) { var settings = new FlywayValidateSettings(configuration); return(Run(settings)); }