示例#1
0
 /// <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));
 }
示例#2
0
 /// <summary>
 /// Flyway validate settings
 /// </summary>
 /// <param name="configuration"></param>
 public FlywayValidateSettings(FlywayConfiguration configuration)
     : base("validate", configuration)
 {
 }
示例#3
0
 /// <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)
 {
 }
示例#4
0
 /// <summary>
 /// Flyway repair settings
 /// </summary>
 /// <param name="configuration"></param>
 public FlywayRepairSettings(FlywayConfiguration configuration)
     : base("repair", configuration)
 {
 }
示例#5
0
 /// <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)
 {
 }
示例#6
0
 /// <summary>
 /// Flyway clean settings
 /// </summary>
 /// <param name="configuration"></param>
 public FlywayCleanSettings(FlywayConfiguration configuration)
     : base("clean", configuration)
 {
 }
示例#7
0
 /// <summary>
 /// Flyway info settings
 /// </summary>
 /// <param name="configuration"></param>
 public FlywayInfoSettings(FlywayConfiguration configuration)
     : base("info", configuration)
 {
 }
示例#8
0
 /// <summary>
 /// Flyway migrate settings
 /// </summary>
 /// <param name="configuration"></param>
 public FlywayMigrateSettings(FlywayConfiguration configuration)
     : base("migrate", configuration)
 {
 }
示例#9
0
 /// <summary>
 /// Flyway baseline settings
 /// </summary>
 /// <param name="configuration"></param>
 public FlywayBaselineSettings(FlywayConfiguration configuration)
     : base("baseline", configuration)
 {
 }
示例#10
0
        /// <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));
        }
示例#11
0
        /// <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));
        }
示例#12
0
        /// <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));
        }